Difference between revisions of "Socket structs"

From Ilianko
(Created page with "== addrinfo == <code> struct addrinfo { int ai_flags; // AI_PASSIVE, AI_CANONNAME, etc. int ai_family; // AF_INET, AF_INET6, AF_UNSPEC int ai_socktype; ...")
 
Line 1: Line 1:
 
== addrinfo ==
 
== addrinfo ==
  
<code>
+
<code><pre>
 
struct addrinfo  
 
struct addrinfo  
 
{
 
{
Line 13: Line 13:
 
   struct addrinfo *ai_next; // linked list, next node
 
   struct addrinfo *ai_next; // linked list, next node
 
};
 
};
</code>
+
</pre></code>

Revision as of 09:13, 12 April 2013

addrinfo

struct addrinfo 
{
  int ai_flags;          // AI_PASSIVE, AI_CANONNAME, etc.
  int ai_family;         // AF_INET, AF_INET6, AF_UNSPEC
  int ai_socktype;       // SOCK_STREAM, SOCK_DGRAM
  int ai_protocol;       // use 0 for "any"
  size_t ai_addrlen;     // size of ai_addr in bytes
  struct sockaddr *ai_addr; // struct sockaddr_in or _in6
  char *ai_canonname;    // full canonical hostname
  struct addrinfo *ai_next; // linked list, next node
};