예제 #1
0
 public void Dispose()
 {
     this.Socket                = null;
     this.HttpObjectParser      = null;
     this.HttpInboundSocketPipe = null;
     this.ReceiveHeaderBuffer   = null;
     this.ReceiveBuffer         = null;
 }
예제 #2
0
 public HttpReaderState(HttpInboundSocketPipe httpInboundSocketPipe, Socket socket, HttpObjectParser httpObjectParser)
 {
     this.HttpInboundSocketPipe = httpInboundSocketPipe;
     this.Socket              = socket;
     this.HttpObjectParser    = httpObjectParser;
     this.ReceiveHeaderBuffer = new byte[Max_Header_Size];
     this.ReceiveBuffer       = new byte[Buffer_Size];
     this.TotalReceived       = 0;
 }
예제 #3
0
        public override void StartReceive()
        {
            if (IsClosed)
            {
                return;
            }
            Socket           readSocket = null;
            HttpObjectParser parser     = null;

            if (isClient)
            {
                readSocket = this.PipesChain.ChainState.ClientSocket;
                parser     = new HttpRequestParser();
            }
            else
            {
                readSocket = this.PipesChain.ChainState.ServerSocket;
                parser     = new HttpResponseParser();
            }

            HttpReaderState httpReaderState = new HttpReaderState(this, readSocket, parser);

            BeginReceive(httpReaderState);
        }