The following is the setting:
Server client
| |
accept connect
| |
v |
send msg1-> |
| |
vv
recv <- send
| |
vv
send msg2-> recv
| |
vv
closeHere is my question:
1. The client actually receives msg1 before closing it, why is this so?
2. send the msg2 message normally. Since the client closes after receiving the msg1 message, why is msg2 sent successfully?
PS I am using streaming socket for TCP.
source
share