I checked it meanwhile.
My ideas was absolutly right:
The client can disconnet immediatly after TCPWRITE.
The server can read the input buffer even after connection has been closed.
The sample is a bit unfair, as it reads the buffer only while the connection is established.
I think in most cases it is a good idea to read the buffer when there is data present, connection established or not.
↧