We are writing TCPServer and Client. How much space is there in the TcpClient buffer? For example, at what point will it start throwing out data? We are trying to determine if TcpClient can block or if it should enter its own background thread (so that the buffer cannot fill).
You can get buffer sizes from TcpClient.ReceiveBufferSize and TcpClient.SendBufferSize .
Available buffer sizes will vary as data is received / acknowledged (or not) at the TCP level. By default, TcpClient is blocked.
- , (, // ..)
MSDN send receive TcpClient - 8192 8 . , .
TcpClient
, , TcpClient, NetworkStream. , . , Read Write NetworkStream. , BeginRead/EndRead BeginWrite/EndWrite.
NetworkStream
Read
Write
BeginRead
EndRead
BeginWrite
EndWrite
- , , , . , .