示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="server"></param>
 /// <param name="client"></param>
 /// <param name="id"></param>
 public Client(SocketServer server, Socket client, int id)
 {
     ID            = id;
     Buffer        = new byte[BUFFER_SIZE];
     Stream        = new MessageStream();
     IsClose       = false;
     Server        = server;
     Socket        = client;
     HaveAdmission = false;
 }
示例#2
0
 public SocketClient(int port, string ip, bool userThread)
 {
     UsedThread           = userThread;
     Port                 = port;
     IP                   = ip;
     Stream               = new MessageStream();
     Handlers             = new Dictionary <MessageClass, ServerMessageHandler>();
     BufferMessage        = new MessageQueue <Message>();
     ReceiveBufferMessage = new MessageQueue <Message>();
     Delay                = 999;
 }