private void TCPConnectAsyncCallback(IAsyncResult ar) { TcpClient client = InitialSocketListener.EndAcceptTcpClient(ar); Output.WriteLine($"\nGameServer: {client.Client.RemoteEndPoint} is trying to connect to GameServerComms..."); Connect(client); SendWelcome(); }
private void TCPBeginReceiveGameServer() => InitialSocketListener.BeginAcceptTcpClient(new AsyncCallback(TCPConnectAsyncCallback), null);