jeudi 4 décembre 2014

Where is "sin_family" in struct sockaddr_in - /usr/include/netinet/in.h?


Vote count:

0




I'm new networking socket in c programming. And I'm trying to make a simple sever - client. The following is what I want to have :



...
//Binding to a port
struct sockaddr_in name;
name.sin_family = PF_INET;
name.sin_port = (in_port_t)htons(30000);
name.sin_addr.s_addr = htonl(INADDR_ANY);
...


Where is sin_family - /usr/include/netinet/in.h - Linux ? If you are a pro, please tell me know what I need to do.



asked 1 min ago







Where is "sin_family" in struct sockaddr_in - /usr/include/netinet/in.h?

Aucun commentaire:

Enregistrer un commentaire