Another question,
i am using a wrapper function to do the socket(),
Code:
int Socket(int family, int type, int protocol)
{
int n;
if ( (n = socket(family, type, protocol)) < 0) {
perror("socket error");
exit(1);
}
return(n);
}
in the main body i do this:
Code:
/* Establish Socket */
sockfd = Socket(AF_INET, SOCK_STREAM, 0);
bind gives me error:
Code:
bind: Address already in use
is it because i have 'n' in the function body set to the socket and then i try to set it to something else: 'sockfd' ?
thank you in advance