accept() - Thank you for calling !
● accept() gets the pending connection on theport you are listen()ing on
● int accept(int sockfd, void *addr, int *addrlen);
– sockfd is the listening socket descriptor
– information about incoming connection is stored in
addr which is a pointer to a local struct sockaddr_in
– addrlen is set to sizeof(struct sockaddr_in)
– accept returns a new socket file descriptor to use
for this accepted connection and -1 on error
No comments:
Post a Comment