From 3de2b56557c80b310341c423492bd8ba895c1abe Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 26 Apr 2018 13:53:40 -0700 Subject: fixes #105 Want NNG_OPT_TCP_NODELAY option fixes #106 TCP keepalive tuning --- src/core/platform.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/platform.h') diff --git a/src/core/platform.h b/src/core/platform.h index 5666b0ed..d6191038 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -248,6 +248,14 @@ extern int nni_plat_tcp_pipe_peername(nni_plat_tcp_pipe *, nni_sockaddr *); // nni_plat_tcp_pipe_sockname gets the local name. extern int nni_plat_tcp_pipe_sockname(nni_plat_tcp_pipe *, nni_sockaddr *); +// nni_plat_tcp_pipe_set_nodelay sets nodelay, disabling Nagle, according +// to the parameter. true disables Nagle; false enables Nagle. +extern int nni_plat_tcp_pipe_set_nodelay(nni_plat_tcp_pipe *, bool); + +// nni_plat_tcp_pipe_set_keepalive indicates that the TCP pipe should send +// keepalive probes. Tuning of these keepalives is current unsupported. +extern int nni_plat_tcp_pipe_set_keepalive(nni_plat_tcp_pipe *, bool); + // nni_plat_tcp_ntop obtains the IP address for the socket (enclosing it // in brackets if it is IPv6) and port. Enough space for both must // be present (48 bytes and 6 bytes each), although if either is NULL then -- cgit v1.2.3-70-g09d2