Higher-level socket functions
<p>I have a typical network protocol consisting of typical message stream (32-bit length field + variable-length body) and I want to read messages asynchronously from a TCP socket.</p>

<p>However C# seems to provide a rather low-level API: I still have to allocate buffers, track the written offset and data length by hand, and maintain state between separate calls to read length and body like in the bad old days of C.</p>

<p>Are there any higher-level functions that I can try out before diving into writing tedious asynchronous stateful code? (no third-party libraries).</p>
