diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-04-26 13:53:40 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-04-26 13:53:40 -0700 |
| commit | 3de2b56557c80b310341c423492bd8ba895c1abe (patch) | |
| tree | 897815f4d9aa30d8c40cbed4c5fec4088d555fda /src/core/platform.h | |
| parent | 492bfcc90d4b80842b024201cc1e4526404128b4 (diff) | |
| download | nng-3de2b56557c80b310341c423492bd8ba895c1abe.tar.gz nng-3de2b56557c80b310341c423492bd8ba895c1abe.tar.bz2 nng-3de2b56557c80b310341c423492bd8ba895c1abe.zip | |
fixes #105 Want NNG_OPT_TCP_NODELAY option
fixes #106 TCP keepalive tuning
Diffstat (limited to 'src/core/platform.h')
| -rw-r--r-- | src/core/platform.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 |
