belikewater
November 27th, 2007, 11:30 PM
Hello All,
I have started to study linux api networking,using a code for a server
I tryed to run it on linux ubuntu, kde/c++:
struct sockaddr_in serv_addr, cli_addr;
sockfd = socket(AF_INET,SOCK_STREAM,0);
clilen = sizeof(cli_addr);
newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, &clilen);
has a problem at 3rd argumnet custing:
tryed to follow the Beej's Guide to Network Programming
and wrote:
clilen = sizeof(struct sockaddr_in);
newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, &clilen);
man pages also doesn't help
so how can i solve the problem?:confused:
I have started to study linux api networking,using a code for a server
I tryed to run it on linux ubuntu, kde/c++:
struct sockaddr_in serv_addr, cli_addr;
sockfd = socket(AF_INET,SOCK_STREAM,0);
clilen = sizeof(cli_addr);
newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, &clilen);
has a problem at 3rd argumnet custing:
tryed to follow the Beej's Guide to Network Programming
and wrote:
clilen = sizeof(struct sockaddr_in);
newsockfd = accept(sockfd, (struct sockaddr *) &cli_addr, &clilen);
man pages also doesn't help
so how can i solve the problem?:confused: