Home > other > TCP protocol in the Nagle algorithm
TCP protocol in the Nagle algorithm
Time:10-01
TCP/IP, rounding a chapter 19 there is a question
Definition of Negle calculate in the book: the algorithm requires a T C P connection there can be at most one unconfirmed unfinished small group, the group does Before the arrival of the recognition can't send other small group, on the contrary, T C P to collect the small amount of grouping, and upon confirmation of arrival to a In the way of a group,
Then an example in the book, the diagram below:
The book contains: Segments 4 and 1 5 appears to be conflict with N a g l e algorithm, through but we need to check the serial number to see The truth, because to confirm the serial number is 5, 4, so the message in section 4 are message segment 1 2 confirmation reply, but customers in the send the newspaper article While, received a message from the server before 1 3, paragraph 1 message 5 contains the serial number for message segment 1 3 5 6 confirmation, So even if we see from the client to the server has two consecutive return message segment, the customer is keep a N a g l e algorithm,
But I still feel that message section 14 and 15 do not conform to the Negle algorithm, no matter what the author said, message section 14 is the client sent a group, but the group has not been confirmed and sent a message 15, it is against Nagle algorithm, just standing on the service side Angle is to observe the Nagle,
CodePudding user response:
I also recently in the drilling and the deep end, although said that from the common sense to explain the operation is reasonable, because the client after receiving 12 period of message, decided to send the current accumulation of message, but after sending, and received a server or paragraph 13 message sent to come over, at this time for the client, do have a message segment has not been confirmed, but it received the message server 13, you must send an ACK confirmed, if according to the definition of nagle, also is not send a new message, then the server will resend message section 13, and then the client send a new message segment, this operation is not as good as in the picture above,