bind error :怎么会有这样的错误呢
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <netdb.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#define portnumber 3333
int main(int argc,char *argv[])
{
int sockfd,new_fd;
struct sockaddr_in server_addr;
struct sockaddr_in client_addr;
int sin_size;
int nbytes;
char buffer[1024];
if((sockfd = socket(AF_INET,SOCK_STREAM,0)) == -1)
{
fprintf(stderr,"Socket error:%s\n\a",strerror(errno));
exit(1);
}
printf("it is successed to biult socket\n");
bzero(&server_addr,sizeof(server_addr));
server_addr.sin_family=AF_INET;
server_addr.sin_addr.s_addr=htonl(INADDR_ANY);
// server_addr.sinaddr.s_addr=inet_addr(192.168.80.129);
server_addr.sin_port=htons(portnumber);
if(bind(sockfd,(struct sockaddr *)(&server_addr),sizeof(struct sockaddr)) == -1);
{
fprintf(stderr,"bind error:%s\n\a",strerror(errno));
exit(1);
}
if(listen(sockfd,5) == -1)
{
fprintf(stderr,"listen error:%s\n\a",strerror(errno));
exit(1);
}
while(1)
{
sin_size = sizeof(struct sockaddr_in);
if((new_fd = accept(sockfd,(struct sockaddr*)(&client_addr),&sin_size)) == -1)
{
fprintf(stderr,"accept error:%s\n\a",strerror(errno));
&nb