Exemplo n.º 1
0
        private void AcceptClient(IAsyncResult ar)
        {
            var socket = Listener.EndAccept(ar);
            var client = new CoCRemoteClient(this, socket);
            Clients.Add(client);

            LoginPacketHandlers.RegisterLoginPacketHandlers(client);
            InGamePacketHandler.RegisterInGamePacketHandlers(client);
            Listener.BeginAccept(AcceptClient, Listener);
        }
Exemplo n.º 2
0
        private void AcceptClient(IAsyncResult ar)
        {
            var socket = Listener.EndAccept(ar);
            var client = new CoCRemoteClient(this, socket);
            Console.WriteLine("Accepted new connection: {0}", socket.RemoteEndPoint);

            // should use a single dictionary of handlers instead.
            LoginPacketHandlers.RegisterLoginPacketHandlers(client);
            InGamePacketHandler.RegisterInGamePacketHandlers(client);
            Clients.Add(client);
            Listener.BeginAccept(AcceptClient, Listener);
        }
Exemplo n.º 3
0
        private void AcceptClient(IAsyncResult ar)
        {
            var socket = Listener.EndAccept(ar);
            var client = new CoCRemoteClient(this, socket);

            Console.WriteLine("Accepted new connection: {0}", socket.RemoteEndPoint);

            // should use a single dictionary of handlers instead.
            LoginPacketHandlers.RegisterLoginPacketHandlers(client);
            InGamePacketHandler.RegisterInGamePacketHandlers(client);
            Clients.Add(client);
            Listener.BeginAccept(AcceptClient, Listener);
        }