diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-28 13:56:46 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-28 14:07:25 +0300 |
commit | 0c2fbbca80a242280e5bb8b079184479c9abfa6f (patch) | |
tree | f1662ebba794800c72a66aefe46789fe8984b14c /usock.h | |
parent | bc7e2772763929a8932c9ec1fc676bee9989f0ae (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.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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. |