-1

I am trying to get a high level understanding of TCP and have come to a confusing point.

Let's say we have a server S and a client C which are connected.

If S pushes a message to C and before C realizes there was a message sent it also pushes a message towards S.

Now were are in a state where S is waiting for it's message ACK and C is also waiting for it's ACK.

How does the specification avoid this kind of deadlock? A lot of the resources online quickly go into specific implementation details, but I am instead trying to find a high level explanation of how these deadlocks are dealt with.

(I am assuming the answer has to do with buffering but have found no specific information on the topic.)

Alex Angelini
  • 459
  • 1
  • 4
  • 12

1 Answers1

1

What deadlock? It's a full-duplex (bidirectional) protocol. Specifically, there is nothing in the situation you describe that prevents both sides sending their ACKs. The behaviour is completely specified in RFC 793 and it is a great deal more sophisticated than you appear to think.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • I know it is much more complex, I am simply trying to simplify it as much as possible for personal understanding. So if you were to describe full duplex in terms of channels would an implementation of TCP require two channels? Or is it possible to implement using a single channel. – Alex Angelini Nov 30 '12 at 01:23
  • @Alex It is a single full-duplex channel. It's OK to 'simplify', but what you are actually doing would be better described as 'making things up'. – user207421 Nov 30 '12 at 01:28