CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2008
    Posts
    10

    question about TCP protocol

    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?

  2. #2
    Join Date
    Nov 2002
    Location
    California
    Posts
    4,556

    Re: question about TCP protocol

    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

  3. #3
    Join Date
    Apr 2008
    Posts
    10

    Re: question about TCP protocol

    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,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured