示例#1
0
 private TcpHostConnection(TcpHost tcpHost, NetworkStream stream, IRequestHandler engine) : base(stream)
 {
     if (tcpHost == null)
     {
         throw new ArgumentNullException("tcpHost");
     }
     if (stream == null)
     {
         throw new ArgumentNullException("stream");
     }
     if (engine == null)
     {
         throw new ArgumentNullException("engine");
     }
     _tcpHost = tcpHost;
     _stream  = stream;
     _engine  = engine;
 }
示例#2
0
 public static void HandleNew(TcpHost tcpHost, TcpClient cl, IRequestHandler engine)
 {
     new TcpHostConnection(tcpHost, cl.GetStream(), engine).StartReading();
 }