G
Gaz
myNetworkStream.Write(byte[], int offset, int size);
From the MSDN documentation:
"
Remarks:
The Write method starts at the specified offset and sends size bytes
from the contents of buffer to the network. The Write method blocks
until the requested number of bytes is sent or a SocketException is
thrown. If you receive a SocketException, use the
SocketException.ErrorCode property to obtain the specific error code,
and refer to the Windows Sockets version 2 API error code documentation
in MSDN for a detailed description of the error.
"
It says the call blocks until the bytes are sent but aren't the bytes
just queued to the write buffer until the OS feels like sending them
over the wire? Therefore doesn't the call always return pretty much
immediately anyway?
Thanks.
From the MSDN documentation:
"
Remarks:
The Write method starts at the specified offset and sends size bytes
from the contents of buffer to the network. The Write method blocks
until the requested number of bytes is sent or a SocketException is
thrown. If you receive a SocketException, use the
SocketException.ErrorCode property to obtain the specific error code,
and refer to the Windows Sockets version 2 API error code documentation
in MSDN for a detailed description of the error.
"
It says the call blocks until the bytes are sent but aren't the bytes
just queued to the write buffer until the OS feels like sending them
over the wire? Therefore doesn't the call always return pretty much
immediately anyway?
Thanks.