diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-24 19:26:31 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-24 19:42:43 -0800 |
| commit | e88f07b434dbcfdb57435a14e1beadcdae3cef0d (patch) | |
| tree | 79433ae3c4ed6d2501e4d63ad9ada5a621df3bd9 /src/core/socket.h | |
| parent | 907a1eb392ca4b29c62b9cc3d2df1ad337695abf (diff) | |
| download | nng-e88f07b434dbcfdb57435a14e1beadcdae3cef0d.tar.gz nng-e88f07b434dbcfdb57435a14e1beadcdae3cef0d.tar.bz2 nng-e88f07b434dbcfdb57435a14e1beadcdae3cef0d.zip | |
Add endpoint tuning of maxrcv size. Fix cmsg API.
The CMSG handling was completely borked. This is fixed now, and
we stash the SP header size (ugh) in the CMSG contents to match what
nanomsg does. We now pass the cmsg validation test.
We also fixed handling of certain endpoint-related options, so that
endpoints can get options from the socket at initialization time.
This required a minor change to the transport API for endpoints.
Finally, we fixed a critical fault in the REP handling of RAW sockets,
which caused them to always return NNG_ESTATE in all cases. It should
now honor the actual socket option.
Diffstat (limited to 'src/core/socket.h')
| -rw-r--r-- | src/core/socket.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/socket.h b/src/core/socket.h index 42f42371..df11ded6 100644 --- a/src/core/socket.h +++ b/src/core/socket.h @@ -48,6 +48,8 @@ struct nni_socket { nni_cv s_notify_cv; // wakes notify thread nni_mtx s_notify_mx; // protects s_notify list + size_t s_rcvmaxsz; // maximum receive size + nni_list s_reaps; // pipes to reap nni_thr s_reaper; nni_thr s_notifier; @@ -112,4 +114,7 @@ extern nni_msgq *nni_sock_recvq(nni_sock *); // here so that protocols can use it to initialize condvars. extern nni_mtx *nni_sock_mtx(nni_sock *); +extern nni_duration nni_sock_linger(nni_sock *); +extern size_t nni_sock_rcvmaxsz(nni_sock *); + #endif // CORE_SOCKET_H |
