NetworkStream doesn't support seek operations
I'm creating simple proxy server but I faced a strange situation, I've following code : var clientRequestStream = _tcpClient.GetStream(); var requestHeader = clientRequestStream.GetUtf8String(); GetUtf8String is a extension method for Stream class which reads stream (contains HttpRequest headers). I need to extract those headers to access Host and Requested Url. Once reading NetworkStream is done. I need to perform seek operation and set its clientRequestStream.Position = 0; because I've to read that stream and write it on another remote NetworkStream . I don't know how should I solve this