aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/pubsub/pub.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-01-08 11:18:16 -0800
committerGarrett D'Amore <garrett@damore.org>2017-01-08 11:18:16 -0800
commitec2574b09a746709f15d2a3f5de135e29f4bcb52 (patch)
tree25f970232f8093b9ce94969eeed2a5f230e94a89 /src/protocol/pubsub/pub.c
parent360d19001b90d92ac2f232efb67e356979b0bc4b (diff)
downloadnng-ec2574b09a746709f15d2a3f5de135e29f4bcb52.tar.gz
nng-ec2574b09a746709f15d2a3f5de135e29f4bcb52.tar.bz2
nng-ec2574b09a746709f15d2a3f5de135e29f4bcb52.zip
Move to generic socket & pipe workers, and up to 4 each.
This should eliminate all need for protocols to do their own thread management tasks.
Diffstat (limited to 'src/protocol/pubsub/pub.c')
-rw-r--r--src/protocol/pubsub/pub.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/protocol/pubsub/pub.c b/src/protocol/pubsub/pub.c
index 684b916d..b597f896 100644
--- a/src/protocol/pubsub/pub.c
+++ b/src/protocol/pubsub/pub.c
@@ -257,20 +257,16 @@ static nni_proto_pipe_ops nni_pub_pipe_ops = {
.pipe_fini = nni_pub_pipe_fini,
.pipe_add = nni_pub_pipe_add,
.pipe_rem = nni_pub_pipe_rem,
- .pipe_send = nni_pub_pipe_send,
- .pipe_recv = nni_pub_pipe_recv,
+ .pipe_worker = { nni_pub_pipe_send,
+ nni_pub_pipe_recv },
};
nni_proto_sock_ops nni_pub_sock_ops = {
.sock_init = nni_pub_sock_init,
.sock_fini = nni_pub_sock_fini,
- .sock_close = NULL,
.sock_setopt = nni_pub_sock_setopt,
.sock_getopt = nni_pub_sock_getopt,
- .sock_send = nni_pub_sock_send,
- .sock_recv = NULL,
- .sock_rfilter = NULL,
- .sock_sfilter = NULL,
+ .sock_worker = { nni_pub_sock_send },
};
nni_proto nni_pub_proto = {