/// <summary>
            /// Handles an incoming raw HTTP response.
            /// </summary>
            /// <param name="channel"></param>
            /// <param name="obj"></param>
            private void HandleIncomingResponse(ISockNetChannel channel, ref object obj)
            {
                if (!(obj is ChunkedBuffer))
                {
                    return;
                }

                ChunkedBuffer data = (ChunkedBuffer)obj;

                if (currentIncoming == null)
                {
                    currentIncoming = new HttpResponse(channel.BufferPool);
                }

                if (currentIncoming.Parse(data.Stream, channel.IsActive))
                {
                    if (SockNetLogger.DebugEnabled)
                    {
                        SockNetLogger.Log(SockNetLogger.LogLevel.DEBUG, this, "Received HTTP Response: Command Line: [{0}], Body Size [{1}]", currentIncoming.CommandLine, currentIncoming.BodySize);
                    }

                    obj             = currentIncoming;
                    currentIncoming = null;
                }
            }
Exemplo n.º 2
0
 internal SingleValueHeaderView(HttpPayload parent)
 {
     this.parent = parent;
 }
Exemplo n.º 3
0
 internal MultiValueHeaderView(HttpPayload parent)
 {
     this.parent = parent;
 }
Exemplo n.º 4
0
 internal SingleValueHeaderView(HttpPayload parent)
 {
     this.parent = parent;
 }
Exemplo n.º 5
0
 internal MultiValueHeaderView(HttpPayload parent)
 {
     this.parent = parent;
 }
            /// <summary>
            /// Handles an incomming raw HTTP response.
            /// </summary>
            /// <param name="channel"></param>
            /// <param name="obj"></param>
            private void HandleIncomingRequest(ISockNetChannel channel, ref object obj)
            {
                if (!(obj is ChunkedBuffer))
                {
                    return;
                }

                ChunkedBuffer data = (ChunkedBuffer)obj;

                if (currentIncoming == null)
                {
                    currentIncoming = new HttpRequest(channel.BufferPool);
                }

                if (currentIncoming.Parse(data.Stream, channel.IsActive))
                {
                    if (SockNetLogger.DebugEnabled)
                    {
                        SockNetLogger.Log(SockNetLogger.LogLevel.DEBUG, this, "Received HTTP Request: Command Line: [{0}], Body Size [{1}]", currentIncoming.CommandLine, currentIncoming.BodySize);
                    }

                    obj = currentIncoming;
                    currentIncoming = null;
                }
            }