hi guys i am trying to bind a name to a socket,
here is the bind chunk :
I get this error:Code:/* Bind the socket */ if (bind(sockfd, (struct sockaddr *)&my_addr, sizeof(struct sockaddr)) == -1) { perror("bind"); exit(1); }
I do not know what the source of the problem could be.Code:bind: Bad file descriptor
sockfd is decaled like so:
thank you in advanceCode:/* listen on sock_fd, new connection on new_fd*/ int sockfd, new_fd;



LinkBack URL
About LinkBacks


