Esempio n. 1
0
        public CClientSocket(MapleClient pClient, Socket sock)
        {
            socket       = sock;
            socketbuffer = new byte[1024];

            host = ((IPEndPoint)socket.RemoteEndPoint).Address.ToString();
            port = ((IPEndPoint)socket.LocalEndPoint).Port;

            dispose_Sync = new object();

            client = pClient;

            Crypto = new CipherHelper(ServerConstants.Version);

            Crypto.PacketFinished += (data) =>
            {
                pClient.RecvPacket(new PacketReader(data));
            };

            WaitForData();
        }