I\'m creating simple proxy server but I faced a strange situation, I\'ve following code :
var clientRequestStream = _tcpClient.GetStream();
var requestHeader = c
Assuming you don't want to properly rewrite your GetUtf8String method to not require seek...
The easiest approach would be to copy stream to MemoryStream first and than you have stream you can seek as much as you want. Stream.CopyTo will take care of copying (.Net4+)
Note that you need to seek resulting MemoryStream back by setting Position property to 0 (copiedStream.Position=0
) or cloning the stream by creating new one (preferably read only) based on buffer and length of first memory stream.