Linux下面的accept函数,中参数的意义???
其中说第三个参数叫做【值-结果】参数,请问什么叫做【值-结果】参数????
初学者 求问 谢谢大家 linux accept函数 参数的意思
[解决办法]
int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
//The argument addr is a pointer to a sockaddr structure.
//This structure is filled in with the address of the peer socket,
//as known to the communications layer. The exact format of the
//address returned addr is determined by the socket's address family (see socket(2) //and the respective protocol man pages).
<in/out>参数就是这个参数进去的时候的值也是有用的, 子函数会用到, 同时子函数里也会改这个值, 提供给外部.