Ejemplo n.º 1
0
 public ClientHandler(Session session, Connection clientConnection)
 {
     _session    = session;
     _connection = clientConnection;
     _stream     = new ManualBufferedStream(new ConnectionStream(_connection), _session.BufferAllocator);
     _reader     = new HttpStreamReader(_stream);
 }
Ejemplo n.º 2
0
 public Pipe(Stream stream)
 {
     if (stream.CanTimeout)
     {
         stream.ReadTimeout  = 10 * 1000;
         stream.WriteTimeout = 10 * 1000;
     }
     Stream = stream;
     Reader = new HttpStreamReader(Stream);
     Writer = new HttpStreamWriter(Stream);
 }