accept Invalid argument
Contents
accept: Invalid argument
int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
Some times we got “accept: Invalid argument” error when write a socket program. There are two kinds of faults which may case this issue:
- Didn’t call bind or listen on sockfd.
- Didn’t initialize the addr or addrlen. addrlen must be a positive value.
Author Hangbin Liu
LastMod 2018-12-13 (1672b97)