aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-07-05 15:08:02 -0700
committerGarrett D'Amore <garrett@damore.org>2017-07-05 15:08:02 -0700
commit0b08b59786e4af19f57bf00ebc20ee8f96453679 (patch)
tree4dad7378b2410a32c3892181baf180551c1b6e4f /src/core
parent56b4dba80ed37469d6302337f38e6539dd78889f (diff)
downloadnng-0b08b59786e4af19f57bf00ebc20ee8f96453679.tar.gz
nng-0b08b59786e4af19f57bf00ebc20ee8f96453679.tar.bz2
nng-0b08b59786e4af19f57bf00ebc20ee8f96453679.zip
Return void on send & recv for transports.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/transport.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/transport.h b/src/core/transport.h
index 05f2e7f7..dd4da299 100644
--- a/src/core/transport.h
+++ b/src/core/transport.h
@@ -89,18 +89,25 @@ struct nni_tran_pipe {
// 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_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 again. The transport will
// have the responsibility to free the message (nng_msg_free()) when
// it is finished with it.
- int (*p_send)(void *, nni_aio *);
+ void (*p_send)(void *, nni_aio *);
// p_recv schedules a message receive. This will be performed even for
// cases where no data is expected, to allow detection of a remote
// disconnect.
- int (*p_recv)(void *, nni_aio *);
+ void (*p_recv)(void *, nni_aio *);
// p_close closes the pipe. Further recv or send operations should
// return back NNG_ECLOSED.