diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-04-12 17:03:40 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-04-12 17:03:40 -0700 |
| commit | 349c1c738c345d6a3930bc5f44cf3e43b2031f54 (patch) | |
| tree | acafa88d35ca20472c0c9bb63f0a6f01a6a65ec4 | |
| parent | d3638e8b6bc85cef900430cedcf2f0beb32c2412 (diff) | |
| download | nng-349c1c738c345d6a3930bc5f44cf3e43b2031f54.tar.gz nng-349c1c738c345d6a3930bc5f44cf3e43b2031f54.tar.bz2 nng-349c1c738c345d6a3930bc5f44cf3e43b2031f54.zip | |
Nuke the synchronous send/recv transport methods.
| -rw-r--r-- | src/core/transport.h | 20 |
1 files changed, 7 insertions, 13 deletions
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. |
