sockelen_t is #define'd to int,
main()
{
....
...
struct sockaddr_in peer;
int size;
...socket(AF_INET, SOCK_STREAM, 0);
....bind(sockfd, ......);
listen(sockfd, .....);
size = sizeof(struct sockaddr_in);
new_fd = accept(sockfd, (struct sockaddr *)&their_addr, &size);
....
......
this should do...
try doing a man 2 accept , too
|