From 349c1c738c345d6a3930bc5f44cf3e43b2031f54 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 12 Apr 2017 17:03:40 -0700 Subject: Nuke the synchronous send/recv transport methods. --- src/core/transport.h | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'src/core') diff --git a/src/core/transport.h b/src/core/transport.h index ab43e497..d965201a 100644 --- a/src/core/transport.h +++ b/src/core/transport.h @@ -90,24 +90,18 @@ struct nni_tran_pipe { // further calls on the same pipe. void (*p_fini)(void *); - int (*p_aio_send)(void *, nni_aio *); - int (*p_aio_recv)(void *, nni_aio *); - - // p_send sends the message. If the message cannot be received, then + // 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 (*pipe_send)(void *, nni_msg *); - - // p_recv recvs the message. This is a blocking operation, and a read - // will be performed even for cases where no data is expected. This - // allows the socket to detect a closed socket, by the returned error - // NNG_ECLOSED. Note that the closed socket condition can arise as - // either a result of a remote peer closing the connection, or a - // synchronous call to p_close. - int (*pipe_recv)(void *, nng_msg **); + int (*p_aio_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_aio_recv)(void *, nni_aio *); // p_close closes the pipe. Further recv or send operations should // return back NNG_ECLOSED. -- cgit v1.2.3-70-g09d2