sockaddr_in Struct Reference

#include <stdapis/netinet/in.h>

struct sockaddr_in

Detailed Description

Socket address, internet style.

Member Attribute Documentation

sin_addr

struct in_addrsin_addr

IP address.

sin_family

u_short sin_family

AF_INET.

sin_port

u_short sin_port

Port number. .

sin_zero

charsin_zero

There's also this sin_zero field which some people claim must be set to zero. Other people don't claim anything about it (the Linux documentation doesn't even mention it at all), and setting it to zero doesn't seem to be actually necessary. So, if you feel like it, set it to zero using memset().