X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=usock.h;h=5f2b84b092ce9ac17cde4645517fb1f9b3cc788a;hb=eac92a4d5d82eb31e712157e7eb425af728b2c43;hp=b0b952b80b052c70a8d9bf2bf5107be42f7036b2;hpb=ad9b5a387df86c3fa1bdf733b913f5bf4b751f21;p=project%2Flibubox.git 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.