Example #1
0
 public ChunkParser(Connection connection,ArraySegment<byte> initialBuffer, int initialBufferOffset, int initialBufferCount)
 {
     _connection = connection;
     _buffer = initialBuffer;
     _bufferCurrentPos = initialBufferOffset;
     _bufferSize = initialBufferOffset + initialBufferCount;
     _readState = ReadState.ChunkLength;
     _currentChunkLength = -1;
 }
Example #2
0
 internal ConnectStream(Connection connection, ArraySegment<byte> buffer, int offset, int bufferCount, long readCount, bool chunked, HttpRequest request)
 {
     _connection = connection;
     _readBytes = readCount;
     _chunked = chunked;
     if (_chunked)
     {
         _chunkParser = new ChunkParser(connection, buffer, offset, bufferCount);
     }
     else
     {
         _readBuffer = buffer;
         _readOffset = offset;
         _readBufferSize = bufferCount;
     }
     _request = request;
     _pooledBuffer = connection.Buffer;
 }
Example #3
0
 internal ConnectStream(Connection connection, HttpRequest request)
 {
     _connection = connection;
     _request = request;
 }