X-Git-Url: http://git.archive.openwrt.org/?p=project%2Flibubox.git;a=blobdiff_plain;f=usock.h;h=5f2b84b092ce9ac17cde4645517fb1f9b3cc788a;hp=2ead7e5fc4affdac19ccb2471970d300cd125bbc;hb=0c2fbbca80a242280e5bb8b079184479c9abfa6f;hpb=bc7e2772763929a8932c9ec1fc676bee9989f0ae diff --git a/usock.h b/usock.h index 2ead7e5..5f2b84b 100644 --- a/usock.h +++ b/usock.h @@ -32,7 +32,13 @@ const char *usock_port(int port); int usock(int type, const char *host, const char *service); -int usock_inet(int type, const char *host, const char *service, void *addr); +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.