diff options
Diffstat (limited to 'src/sp/protocol/pipeline0/push.c')
| -rw-r--r-- | src/sp/protocol/pipeline0/push.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/src/sp/protocol/pipeline0/push.c b/src/sp/protocol/pipeline0/push.c index 0bd57d0a..f99dddc3 100644 --- a/src/sp/protocol/pipeline0/push.c +++ b/src/sp/protocol/pipeline0/push.c @@ -364,16 +364,11 @@ push0_get_send_buf_len(void *arg, void *buf, size_t *szp, nni_opt_type t) } static int -push0_sock_get_send_fd(void *arg, void *buf, size_t *szp, nni_opt_type t) +push0_sock_get_send_fd(void *arg, int *fdp) { push0_sock *s = arg; - int rv; - int fd; - if ((rv = nni_pollable_getfd(&s->writable, &fd)) != 0) { - return (rv); - } - return (nni_copyout_int(fd, buf, szp, t)); + return (nni_pollable_getfd(&s->writable, fdp)); } static nni_proto_pipe_ops push0_pipe_ops = { @@ -387,10 +382,6 @@ static nni_proto_pipe_ops push0_pipe_ops = { static nni_option push0_sock_options[] = { { - .o_name = NNG_OPT_SENDFD, - .o_get = push0_sock_get_send_fd, - }, - { .o_name = NNG_OPT_SENDBUF, .o_get = push0_get_send_buf_len, .o_set = push0_set_send_buf_len, @@ -402,14 +393,15 @@ static nni_option push0_sock_options[] = { }; static nni_proto_sock_ops push0_sock_ops = { - .sock_size = sizeof(push0_sock), - .sock_init = push0_sock_init, - .sock_fini = push0_sock_fini, - .sock_open = push0_sock_open, - .sock_close = push0_sock_close, - .sock_options = push0_sock_options, - .sock_send = push0_sock_send, - .sock_recv = push0_sock_recv, + .sock_size = sizeof(push0_sock), + .sock_init = push0_sock_init, + .sock_fini = push0_sock_fini, + .sock_open = push0_sock_open, + .sock_close = push0_sock_close, + .sock_options = push0_sock_options, + .sock_send = push0_sock_send, + .sock_recv = push0_sock_recv, + .sock_send_poll_fd = push0_sock_get_send_fd, }; static nni_proto push0_proto = { |
