In TCP/IP sockets, how would the server know that a client is busy and not receiving data ?
My solution:
Use connect(),
I am not sure.
thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If a TCP is constantly pushing data that the peer doesn’t acknowledge, eventually the send window will fill up. At that point the TCP is going to buffer data to “send later”. Eventually the buffer size will be reached and
send(2)will hang (something it doesn’t usually do).If
send(2)starts hanging it means the peer TCP isn’t acknowledging data.Obviously, even if the peer TCP accepts data it doesn’t mean the peer application actually uses it. You could implement your own
ACKmechanism on top ofTCP, and it’s not as unreasonable as it sounds. It would involve having the client send a “send me more” message once in a while.