コード例 #1
0
        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
            {
            }
        }
コード例 #2
0
 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;
 }
コード例 #3
0
        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;
        }