Search Results

Search found 1 results on 1 pages for 'lojin'.

Page 1/1 | 1 

  • setsockopt (sys/socket.h)

    - by lojin
    The prototype for setsockopt is: int setsockopt(int socket, int level, int option_name, const void *option_value, socklen_t option_len); Are the following all correct ? Which are not ? a.) int buffsize = 50000; setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&buffsize, sizeof(buffsize)); b.) int buffsize = 50000; setsockopt(s, SOL_SOCKET, SO_RCVBUF, (void *)&buffsize, sizeof(buffsize)); c.) char *buffsize = "50000"; setsockopt(s, SOL_SOCKET, SO_RCVBUF, buffsize, strlen(buffsize)); d.) setsockopt(s, SOL_SOCKET, SO_RCVBUF, "50000", 5);

    Read the article

1