Ejemplo n.º 1
0
 internal HttpClient(Socket handle, HttpWebServer server)
 {
     this.handle = handle;
     this.server = server;
     this.website = HttpWebsite.InternalWebsite;
     this.buffer = new byte[buffersize];
     this.request = new HttpRequest(this);
     this.response = new HttpResponse();
     handle.ReceiveTimeout = 30 * 1000;
 }
Ejemplo n.º 2
0
        private void Response()
        {
            request = new HttpRequest();
            response.headers.Add(eHttpResponseHeader.Server, MyHttpWebServer.ServerVersion);

            if (response.Response(handle))
            {
                if (this.request.headers.Connection != eConnectionType.KeepAlive)
                {
                    Disconnect();
                }
                else
                {
                    Receive();
                }
            }
            else
            {
                Disconnect();
            }
        }