listen() - Call me please!
● Waits for incoming connections● int listen(int sockfd, int backlog);
– sockfd is the socket file descriptor returned by
socket()
– backlog is the number of connections allowed on
the incoming queue
– listen() returns -1 on error
– Need to call bind() before you can listen()
● socket()
● bind()
● listen()
● accept()
No comments:
Post a Comment