summaryrefslogtreecommitdiff
path: root/src/ip.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-07-28 15:13:04 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-07-28 15:13:04 +0200
commitb45fec337aff8e04bebaf6e898a499f05ee6b0d6 (patch)
treec0e86a97203c533e9808a5c81ace8e1ee4717bf1 /src/ip.hpp
parent46b053b8d67ba4826302d53268edccf919e6d785 (diff)
Tuning of TCP sockets is done at a single place
Instead of being spread throughout the codebase, the tuning is done in tune_tcp_socket() function. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/ip.hpp')
-rw-r--r--src/ip.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ip.hpp b/src/ip.hpp
index ec2db43..8a690b0 100644
--- a/src/ip.hpp
+++ b/src/ip.hpp
@@ -22,6 +22,7 @@
#define __ZMQ_IP_HPP_INCLUDED__
#include "platform.hpp"
+#include "fd.hpp"
#ifdef ZMQ_HAVE_WINDOWS
#include "windows.hpp"
@@ -30,6 +31,7 @@
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
+#include <netinet/tcp.h>
#include <netdb.h>
#endif
@@ -60,9 +62,12 @@ namespace zmq
int resolve_ip_hostname (sockaddr_storage *addr_, socklen_t *addr_len_,
const char *hostname_);
- // This function sets up address for UNIX domain transport.
+ // This function sets up address for UNIX domain transport.
int resolve_local_path (sockaddr_storage *addr_, socklen_t *addr_len_,
const char* pathname_);
+
+ // Tunes the supplied TCP socket for the best latency.
+ void tune_tcp_socket (fd_t s_);
}
#endif