X-Git-Url: http://git.archive.openwrt.org/?p=project%2Flibubox.git;a=blobdiff_plain;f=usock.h;h=5f2b84b092ce9ac17cde4645517fb1f9b3cc788a;hp=b0b952b80b052c70a8d9bf2bf5107be42f7036b2;hb=f714be125c9b85e184a482bc22e958b5cadfad3a;hpb=ad9b5a387df86c3fa1bdf733b913f5bf4b751f21 diff --git a/usock.h b/usock.h index b0b952b..5f2b84b 100644 --- a/usock.h +++ b/usock.h @@ -32,6 +32,13 @@ const char *usock_port(int port); int usock(int type, const char *host, const char *service); +int usock_inet_timeout(int type, const char *host, const char *service, + void *addr, int timeout); +static inline int +usock_inet(int type, const char *host, const char *service, void *addr) +{ + return usock_inet_timeout(type, host, service, addr, -1); +} /** * Wait for a socket to become ready.