I am trying to use SO_NOSIGPIPE in a tcp socket.
int set = 1;
setsockopt(sockDesc, SOL_SOCKET, SO_NOSIGPIPE, (void *)&set, sizeof(int);
but an error is coming:
error: SO_NOSIGPIPE was not declared in this scope
Is there any header files required, to use that. I have searched over the Internet but didn't get any useful solution.