예제 #1
0
 public Session(Stream clientConnection, IPEndPoint endpoint, HttpProxy proxy)
 {
     Endpoint      = endpoint;
     Proxy         = proxy;
     Id            = Guid.NewGuid();
     ClientPipe    = new Pipe(clientConnection);
     ClientHandler = new ClientHandler(this);
     Flags         = new SessionFlag();
     CurrentState  = State.ReceivingHeaders;
 }
예제 #2
0
 internal Session(Pipe clientPipe, Pipe serverPipe, HttpProxy proxy)
 {
     Id            = Guid.NewGuid();
     ClientPipe    = clientPipe;
     ClientHandler = new ClientHandler(this);
     ServerPipe    = serverPipe;
     ServerHandler = new ServerHandler(this);
     Flags         = new SessionFlag();
     CurrentState  = State.ReceivingHeaders;
     Proxy         = proxy;
 }