aboutsummaryrefslogtreecommitdiff
path: root/src/core/pipe.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-25 18:08:44 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-25 18:08:44 -0800
commit0cd2fa7310f1fdf45443a8a9e3335658b1c3c64c (patch)
tree1098c7f4976033bb311b45c378079700c9330b62 /src/core/pipe.h
parent64de60d98e8e4a896f9d13e4aa70343f329d88b4 (diff)
downloadnng-0cd2fa7310f1fdf45443a8a9e3335658b1c3c64c.tar.gz
nng-0cd2fa7310f1fdf45443a8a9e3335658b1c3c64c.tar.bz2
nng-0cd2fa7310f1fdf45443a8a9e3335658b1c3c64c.zip
Substantial fixes for listen & dialers.
At this point listening and dialing operations appear to function properly. As part of this I had to break the close logic up since otherwise we had a loop trying to reap a thread from itself. So there is now a separate reaper thread for pipes per-socket. I also changed lists to be a bit more rigid, and allocations now zero memory initially. (We had bugs due to uninitialized memory, and rather than hunt them all down, lets just init them to sane zero values.)
Diffstat (limited to 'src/core/pipe.h')
-rw-r--r--src/core/pipe.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/pipe.h b/src/core/pipe.h
index 5349bbb1..4594f65b 100644
--- a/src/core/pipe.h
+++ b/src/core/pipe.h
@@ -19,10 +19,13 @@
struct nng_pipe {
uint32_t p_id;
struct nni_pipe_ops p_ops;
- void * p_data;
- nni_list_node p_sock_node;
+ void * p_trandata;
+ void * p_protdata;
+ nni_list_node p_node;
nni_socket * p_sock;
nni_endpt * p_ep;
+ int p_reap;
+ int p_active;
};
// Pipe operations that protocols use.
@@ -33,7 +36,7 @@ extern void nni_pipe_close(nni_pipe *);
// Used only by the socket core - as we don't wish to expose the details
// of the pipe structure outside of pipe.c.
-extern int nni_pipe_create(nni_pipe **, const nni_pipe_ops *);
+extern int nni_pipe_create(nni_pipe **, nni_endpt *);
extern void nni_pipe_destroy(nni_pipe *);