Click to See Complete Forum and Search --> : question about TCP protocol
matrix80
April 28th, 2008, 06:35 AM
Sorry for posting this question, I'm a new to network programming. Please refer to the figure below:
Client Server
----------send X---------------->
<---------response-------------
Server received X successfully. Client didn't receive response (for X), but server didn't re-send it (because server thought that the previous response was transmitted successfully). Can this case happen?
MikeAThon
April 28th, 2008, 10:14 AM
Can this case happen?
Not under TCP. The only reason that the server will think that the response was transmitted successfully, is for the client to send an ACK which indicates that, indeed, the client received the response successfully.
Are you seeing this behavior? If so, TCP is probably working fine. It's probably the way your application is using TCp that's causing the behavior you see.
Mike
matrix80
April 29th, 2008, 01:11 AM
Thanks for your reply, it reminds me of hardware problem. I might not receive event from the low layer. I have one more question:
1. Client -------<connect OK>---------> Server
2. Client -------<send OK>-------------> Server
3. Client <-----------<response>------- Server
Normally if step 3 successes, Client will close the connection. Otherwise, server will retransmit and perhaps after a re-transmission timeout the connection will be forced to close by server. But client doesn't know about connection status in this case. Should I set a connection timeout in this case?
Thank you,
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.