G
Guest
Hi
I've recently written a .NET client which communicated to a server via a
TcpClient class (from System.Net.Sockets).
One thing I noticed is my call to the GetStream().Read() method is not
blocking.
I've been through a few different sections in the MSDN help as well as a few
books and articles about the TcpClient class and have gotten some conflicting
information.
The information on the ReceiveTimeout property states it will set the
blocking on the NetworkStream.Read() method.
The documention on the NetworkStream.Read() method give the impression that
a call is non-block since it doesn't wait for data to become available before
returning.
I've looked at a number of samples of using the TcpClient class at various
sites and all appear to be written as if the Read method will block.
Does anyone know if there are specific conditions which may be affecting
this behaviour (i.e. additional properties or server / network factors)?
Thanks in advance
Al
I've recently written a .NET client which communicated to a server via a
TcpClient class (from System.Net.Sockets).
One thing I noticed is my call to the GetStream().Read() method is not
blocking.
I've been through a few different sections in the MSDN help as well as a few
books and articles about the TcpClient class and have gotten some conflicting
information.
The information on the ReceiveTimeout property states it will set the
blocking on the NetworkStream.Read() method.
The documention on the NetworkStream.Read() method give the impression that
a call is non-block since it doesn't wait for data to become available before
returning.
I've looked at a number of samples of using the TcpClient class at various
sites and all appear to be written as if the Read method will block.
Does anyone know if there are specific conditions which may be affecting
this behaviour (i.e. additional properties or server / network factors)?
Thanks in advance
Al