diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-02 13:57:53 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-11-02 14:47:50 -0700 |
| commit | 279180c1d07fc2c4c0bfa8f5a418cb02c4b87863 (patch) | |
| tree | b451ac7f845062674d6ab45eb5d530628d3ff47c /src/core/socket.h | |
| parent | 9b27984d0e2da430b78a975e59f55c96de5f6056 (diff) | |
| download | nng-279180c1d07fc2c4c0bfa8f5a418cb02c4b87863.tar.gz nng-279180c1d07fc2c4c0bfa8f5a418cb02c4b87863.tar.bz2 nng-279180c1d07fc2c4c0bfa8f5a418cb02c4b87863.zip | |
NNG_OPT_RECVFD and NNG_OPT_SENDFD converted to functions.
These options are removed entirely, and their functionality is now
available via special functions, `nng_socket_get_send_poll_fd` and
`nng_socket_get_recv_poll_fd`, making these first class methods on
the socket.
This eliminates a bit of wasteful code, and provides type safety
for these methods.
Diffstat (limited to 'src/core/socket.h')
| -rw-r--r-- | src/core/socket.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/socket.h b/src/core/socket.h index c4037e96..714ad5bb 100644 --- a/src/core/socket.h +++ b/src/core/socket.h @@ -34,6 +34,8 @@ extern int nni_sock_getopt( extern void nni_sock_send(nni_sock *, nni_aio *); extern void nni_sock_recv(nni_sock *, nni_aio *); extern uint32_t nni_sock_id(nni_sock *); +extern int nni_sock_get_send_fd(nni_sock *s, int *fdp); +extern int nni_sock_get_recv_fd(nni_sock *s, int *fdp); // These are socket methods that protocol operations can expect to call. // Note that each of these should be called without any locks held, since |
