示例#1
0
        public void CallClientAccepted(Socket s)
        {
            nextClientId++;

            ClientInfoSocket socket = new ClientInfoSocket(s, nextClientId);
            socket.ClientDisconnected += new Handlers.IntEH(ClientDisconnected);
            socket.PacketReceived += new ClientInfoSocket.PacketReceivedEventHandler(Receive);
            Clients.Add(nextClientId, socket);
            //ClientInfoRequestPacket cirp = new ClientInfoRequestPacket(id);
            //ci.Send(cirp);

            if (ClientAccepted != null)
                ClientAccepted(nextClientId);
        }
示例#2
0
        public void CallClientAccepted(Socket s)
        {
            nextClientId++;

            ClientInfoSocket socket = new ClientInfoSocket(s, nextClientId);

            socket.ClientDisconnected += new Handlers.IntEH(ClientDisconnected);
            socket.PacketReceived     += new ClientInfoSocket.PacketReceivedEventHandler(Receive);
            Clients.Add(nextClientId, socket);
            //ClientInfoRequestPacket cirp = new ClientInfoRequestPacket(id);
            //ci.Send(cirp);

            if (ClientAccepted != null)
            {
                ClientAccepted(nextClientId);
            }
        }