Skip to content

Correct working flow of accept() #177

Discussion options

You must be logged in to vote

For KENS, I recommend following order (flow before Linux 2.2):

Client SYN packet -> pushed to the queue -> send SYNACK -> receive ACK -> pop the request ->  accept()
Real implementations in modern OSes. You don't need to read this.

FYI, the above is not the exact flow of modern OSes.
In the real implementations, the flow goes like below:

Client SYN packet -> pushed to the queue -> send SYNACK -> receive ACK -> accept() -> pop the request 

The behavior of the backlog argument on TCP sockets changed with Linux 2.2. Now it specifies the
queue length for completely established sockets waiting to be accepted, i…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@JaesukLim
Comment options

@Pusnow
Comment options

Answer selected by JaesukLim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants