Ejemplo n.º 1
0
 public HttpAuthorizer(HttpServer server)
 {
     if (server == null) {
     throw new ArgumentNullException("server");
       }
       this.server = server;
       server.OnAuthorizeClient += OnAuthorize;
 }
Ejemplo n.º 2
0
        public HttpClient(HttpServer aOwner, TcpClient aClient)
        {
            State = HttpStates.ACCEPTED;
              lastActivity = DateTime.Now;

              owner = aOwner;
              client = aClient;
              stream = client.GetStream();
              client.Client.UseOnlyOverlappedIO = true;

              RemoteEndpoint = client.Client.RemoteEndPoint as IPEndPoint;
              LocalEndPoint = client.Client.LocalEndPoint as IPEndPoint;
        }