Exemple #1
0
 //Constructor
 public AbstractClient(Socket sock, AbstractServer parent)
 {
     parentServer = parent;
     socket       = sock;
     sock.BeginReceive(buffer, 0, BufferSize, 0,
                       new AsyncCallback(ReadCallback), this);
 }
Exemple #2
0
        //Constructor
        public GMTCPClient(Socket sock, AbstractServer parent)
            : base(sock, parent)
        {
            PacketBuffer handshakePacket = new PacketBuffer();

            Logger.Trace("Connection Accepted. Beginning GM Handshake...");
            handshakePacket.WriteString("GM:Studio-Connect", true);
            base.SendPacket(handshakePacket);
            handshakeStatus = GMTCPHandshakeStage.AwaitingConnectAck;
        }
 //Create a client
 abstract public AbstractClient CreateClient(Socket sock, AbstractServer server);