aboutsummaryrefslogtreecommitdiff
path: root/src/core/transport.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-08-06 19:01:12 +0300
committerGarrett D'Amore <garrett@damore.org>2018-08-06 19:01:12 +0300
commitae944a8de32c107eea9427104e153c25e4a681f1 (patch)
tree7029f7668fe3e1a9899da57bf6c1e60e0394bacb /src/core/transport.h
parentd7f7c896c0ede24249ef63b1e45b1878bf4bd473 (diff)
downloadnng-ae944a8de32c107eea9427104e153c25e4a681f1.tar.gz
nng-ae944a8de32c107eea9427104e153c25e4a681f1.tar.bz2
nng-ae944a8de32c107eea9427104e153c25e4a681f1.zip
Revert "fixes #599 nng_dial sync should not return until added to socket"
This changeset needs work. We are seeing errors described by This reverts commit d7f7c896c0ede24249ef63b1e45b1878bf4bd473.
Diffstat (limited to 'src/core/transport.h')
-rw-r--r--src/core/transport.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/transport.h b/src/core/transport.h
index 458bfda4..257d232d 100644
--- a/src/core/transport.h
+++ b/src/core/transport.h
@@ -30,8 +30,7 @@ enum nni_ep_mode {
#define NNI_TRANSPORT_V1 0x54520001
#define NNI_TRANSPORT_V2 0x54520002
#define NNI_TRANSPORT_V3 0x54520003
-#define NNI_TRANSPORT_V4 0x54520004
-#define NNI_TRANSPORT_VERSION NNI_TRANSPORT_V4
+#define NNI_TRANSPORT_VERSION NNI_TRANSPORT_V3
// Option handlers.
struct nni_tran_option {
@@ -132,12 +131,19 @@ struct nni_tran_pipe_ops {
// make further calls on the same pipe.
void (*p_fini)(void *);
+ // p_start starts the pipe running. This gives the transport a
+ // chance to hook into any transport specific negotiation
+ // phase. The pipe will not have its p_send or p_recv calls
+ // started, and will not be access by the "socket" until the
+ // pipe has indicated its readiness by finishing the aio.
+ void (*p_start)(void *, nni_aio *);
+
// p_stop stops the pipe, waiting for any callbacks that are
// outstanding to complete. This is done before tearing down
// resources with p_fini.
void (*p_stop)(void *);
- // p_send queues the message for transmit. If this fails,
+ // p_aio_send queues the message for transmit. If this fails,
// then the caller may try again with the same message (or free
// it). If the call succeeds, then the transport has taken
// ownership of the message, and the caller may not use it