I just recently ported a Delphi synchronous socket library to C#, at least
the core, but it can do read and writelines (CRLF delimited) without the
over head of the NetworkStream and streamreader/writer objects.
It also has very handy sendstream and receivestream methods that can read
directly into the stream of your choice (memory or file stream)
The data is streamed over in chunks defined by the maxchunksize property.
By default it is set to 64k.
If interested take a look at:
http://groups.yahoo.com/group/synalist/
I did the port with permission of the original author.
Also if any experienced C# developers would be interested in making it
better have at it :-)
--
Tony Caduto
Inexpensive Corporate Messaging
AM Software Design
http://www.amsoftwaredesign.com