Пример #1
0
        static HookResult OnAccepted(Terraria.Net.Sockets.ISocket client)
        {
            int slot = FindNextOpenClientSlot();

            if (slot != -1)
            {
                Netplay.Clients[slot].Reset();
                Netplay.Clients[slot].Socket = client;
            }
            if (FindNextOpenClientSlot() == -1)
            {
                Netplay.StopListening();
            }
            return(HookResult.Cancel);
        }