Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-28 13:56:46 +0300
committerFelix Fietkau <nbd@openwrt.org>2016-01-28 14:07:25 +0300
commit0c2fbbca80a242280e5bb8b079184479c9abfa6f (patch)
treef1662ebba794800c72a66aefe46789fe8984b14c /usock.h
parentbc7e2772763929a8932c9ec1fc676bee9989f0ae (diff)
usock: implement usock_inet_timeout() with RFC6555 support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'usock.h')
-rw-r--r--usock.h8
1 files changed, 7 insertions, 1 deletions
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.