]> git.ozlabs.org Git - ccan/blobdiff - ccan/net/_info
crypto/hmac_sha256: new module.
[ccan] / ccan / net / _info
index 845458c0eb0e2e4e5b09a161ccf54e1ffdab2bab..cfa58f842830fd07ce4c89effa95e203e4248234 100644 (file)
@@ -1,10 +1,13 @@
-#include <string.h>
 #include "config.h"
+#include <stdio.h>
+#include <string.h>
 
 /**
- * net - simple IPv4/IPv6 client library
+ * net - simple IPv4/IPv6 socket library
  *
- * This code makes it simple to support IPv4 and IPv6 without speed penalty.
+ * This code makes it simple to support IPv4 and IPv6 without speed penalty
+ * in clients by using non-blocking simultaneous connect, and using
+ * a convenience function to create both IPv4 and IPv6 sockets for servers.
  *
  * License: MIT
  *
@@ -12,8 +15,6 @@
  *
  * Example:
  *     #include <ccan/net/net.h>
- *     #include <sys/types.h>
- *     #include <sys/socket.h>
  *     #include <netinet/in.h>
  *     #include <stdio.h>
  *     #include <err.h>
@@ -46,6 +47,7 @@
  *             fd = net_connect(addr);
  *             if (fd < 0)
  *                     err(1, "Failed to connect to %s", dest);
+ *             freeaddrinfo(addr);
  *     
  *             if (getsockname(fd, &u.s, &slen) == 0)
  *                     printf("Connected via %s\n",