private static void ConnectionStatusChanged(SteamNetConnectionStatusChangedCallback_t data) { if (data.Nfo.listenSocket.Id == 0) { ConnectionInterface connectionInterface = SteamNetworkingSockets.GetConnectionInterface(data.Conn.Id); if (connectionInterface != null) { connectionInterface.OnConnectionChanged(data.Nfo); } } else { SocketInterface socketInterface = SteamNetworkingSockets.GetSocketInterface(data.Nfo.listenSocket.Id); if (socketInterface != null) { socketInterface.OnConnectionChanged(data.Conn, data.Nfo); } } Action <Connection, ConnectionInfo> action = SteamNetworkingSockets.OnConnectionStatusChanged; if (action != null) { action(data.Conn, data.Nfo); } else { } }
internal static void SetSocketInterface(uint id, SocketInterface iface) { if (id == 0) { throw new ArgumentException("Invalid Socket"); } Console.WriteLine(String.Format("Installing Socket For {0}", id)); SteamNetworkingSockets.SocketInterfaces[id] = iface; }
internal static void SetSocketInterface(uint id, SocketInterface iface) { if (id == 0) { throw new System.ArgumentException("Invalid Socket"); } Console.WriteLine($"Installing Socket For {id}"); SocketInterfaces[id] = iface; }