diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-29 23:49:05 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-29 23:49:05 -0800 |
| commit | 0f5ed9c09bcbe0c0dabdf48ea14e85d418b3d8b6 (patch) | |
| tree | b2ea7f56ae0dc6d32219e695725f55d78b9e0b34 /src/core/pipe.h | |
| parent | 5d90b485fdb39cac7d1aac2ab8958ecd585ac69b (diff) | |
| download | nng-0f5ed9c09bcbe0c0dabdf48ea14e85d418b3d8b6.tar.gz nng-0f5ed9c09bcbe0c0dabdf48ea14e85d418b3d8b6.tar.bz2 nng-0f5ed9c09bcbe0c0dabdf48ea14e85d418b3d8b6.zip | |
Factor out repeated protocol code into common.
Diffstat (limited to 'src/core/pipe.h')
| -rw-r--r-- | src/core/pipe.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/pipe.h b/src/core/pipe.h index 4594f65b..2b4feb7d 100644 --- a/src/core/pipe.h +++ b/src/core/pipe.h @@ -20,12 +20,20 @@ struct nng_pipe { uint32_t p_id; struct nni_pipe_ops p_ops; void * p_trandata; - void * p_protdata; + void * p_pdata; // protocol specific data + size_t p_psize; // size of protocol data nni_list_node p_node; nni_socket * p_sock; nni_endpt * p_ep; int p_reap; int p_active; + int p_abort; + nni_mutex p_mx; + nni_cond p_cv; + void (*p_send)(void *); + void (*p_recv)(void *); + nni_thread * p_send_thr; + nni_thread * p_recv_thr; }; // Pipe operations that protocols use. @@ -40,6 +48,7 @@ extern int nni_pipe_create(nni_pipe **, nni_endpt *); extern void nni_pipe_destroy(nni_pipe *); +extern int nni_pipe_start(nni_pipe *); extern int nni_pipe_getopt(nni_pipe *, int, void *, size_t *sizep); #endif // CORE_PIPE_H |
