Last active
July 23, 2019 04:14
-
-
Save kkumar-fk/6abcb151771cd36770fb723925d49f57 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct sock *inet_csk_accept(struct sock *sk) | |
{ | |
struct sock *newsk = NULL; /* client socket */ | |
/* Make sure that this socket is listening, and that it has something pending. */ | |
lock_sock(sk); | |
if (sk->sk_state == TCP_LISTEN) | |
if ("there are completed connections waiting to be accepted") | |
newsk = get_first_connection(sk); | |
release_sock(sk); | |
return newsk; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment