![]() This answer is an all-time classic and probably has more internals than you want to know. That has bitten many network protocol designers in the past, in cases where you need for multiple parties to connect to relay messages (you literally can't know whether you need to store a message for a later connected node you will have to have logic on top of everything to avoid the late joiner problem). You generally mustn't assume that the first entry in the accept queue is the first client to initiate a connection. However, note that this is highly stochastic: it depends on how fast both ends react to SYN, SYN-ACK packets, and how long it takes to transport these. So, that's the order by which things are inserted into the accept queue. Now, it's not intuitively clear who should be "first" in the queue: the first one whose SYN was received? The first one to which a SYN-ACK could be sent to? Or the first one whose ACK to that was received?īut thinking about it, the point where the kernel knows a socket is ready for accept returning something is when it receives the ACK. Let's have a look at a simplified view of the TCP state machine: "Queue" actually says that the word always refers to a FIFO data structure (just as the queue in your post office, where you need to have been the first there to be served first).Ĭonnections in the same order as they arrived to the host?Ĭonnections do not "arrive"! That's the problematic thing in this formulation, and where ambiguity actually comes from. The Mx/G/1 queue without server vacations, with multiple vacations is studied under. It extracts the first connection request on the queue of pending connections
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |