diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2011-07-28 15:13:04 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-07-28 15:13:04 +0200 |
commit | b45fec337aff8e04bebaf6e898a499f05ee6b0d6 (patch) | |
tree | c0e86a97203c533e9808a5c81ace8e1ee4717bf1 /src/ip.hpp | |
parent | 46b053b8d67ba4826302d53268edccf919e6d785 (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.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |