Network communication in .NET

May 14 2006 4:34 PM

Hi ^,

i would like to create a synchron TCP communication using the .NET framework NetworkStream class. In theoretically the NetworkStream::Write(...) function ensures a  synchron sending but my problem is that the Write() function retrieves without waiting for the server gets the data since in fact the Write method puts the data into the outgoing network buffer and the Write() doesn't wait for the server's answer. The Write() method will be blocked just after this buffer will be full.

Do you know someone how can i switch out this buffer or how can i set the size of this buffer to zero? Thx for your help!