diff options
author | antirez <antirez@gmail.com> | 2015-06-11 12:55:58 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-06-11 14:34:38 +0200 |
commit | a017b7ec0e68792fa79b611023f3065c4e0c9394 (patch) | |
tree | 2038eb7b19ae82f81ff847397e0d4eed0d8421de /src/anet.h | |
parent | 8fa8b251a9766f987a7704f034e66c645f0c3afe (diff) | |
download | redis-a017b7ec0e68792fa79b611023f3065c4e0c9394.tar.gz |
anet.c: new API anetTcpNonBlockBestEffortBindConnect()
This performs a best effort source address binding attempt. If it is
possible to bind the local address and still have a successful
connect(), then this socket is returned. Otherwise the call is retried
without source address binding attempt.
Related to issues #2609 and #2612.
Diffstat (limited to 'src/anet.h')
-rw-r--r-- | src/anet.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/anet.h b/src/anet.h index ea9c77f2e..8740a95d0 100644 --- a/src/anet.h +++ b/src/anet.h @@ -50,6 +50,7 @@ int anetTcpConnect(char *err, char *addr, int port); int anetTcpNonBlockConnect(char *err, char *addr, int port); int anetTcpNonBlockBindConnect(char *err, char *addr, int port, char *source_addr); +int anetTcpNonBlockBestEffortBindConnect(char *err, char *addr, int port, char *source_addr); int anetUnixConnect(char *err, char *path); int anetUnixNonBlockConnect(char *err, char *path); int anetRead(int fd, char *buf, int count); |