X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fnet%2F_info;h=cfa58f842830fd07ce4c89effa95e203e4248234;hb=d32033ada4a4e5821baef20958ae6de0b54622b2;hp=845458c0eb0e2e4e5b09a161ccf54e1ffdab2bab;hpb=7274405006c44e8af664c5ac7aa8b1e523d9a7be;p=ccan diff --git a/ccan/net/_info b/ccan/net/_info index 845458c0..cfa58f84 100644 --- a/ccan/net/_info +++ b/ccan/net/_info @@ -1,10 +1,13 @@ -#include #include "config.h" +#include +#include /** - * 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 - * #include - * #include * #include * #include * #include @@ -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",