/// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="socket">维护的Socket对象</param>
 /// <param name="server">维护此连接的服务对象</param>
 /// <param name="recLength">接受缓冲区大小</param>
 public TcpSocketConnection(Socket socket, TcpSocketServer server, int recLength)
 {
     _socket    = socket;
     _server    = server;
     _recLength = recLength;
 }
예제 #2
0
 /// <summary>
 /// 构造函数
 /// 注:默认监听0.0.0.0
 /// </summary>
 /// <param name="port">监听端口</param>
 public WebSocketServer(int port)
 {
     _tcpSocketServer = new TcpSocketServer(port);
 }
예제 #3
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="socket">维护的Socket对象</param>
 /// <param name="server">维护此连接的服务对象</param>
 public TcpSocketConnection(Socket socket, TcpSocketServer server)
 {
     _socket = socket;
     _server = server;
 }