aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/endpt.c14
-rw-r--r--src/core/transport.h10
2 files changed, 4 insertions, 20 deletions
diff --git a/src/core/endpt.c b/src/core/endpt.c
index e5a9a5bb..ddfde49e 100644
--- a/src/core/endpt.c
+++ b/src/core/endpt.c
@@ -266,12 +266,7 @@ nni_ep_connect_sync(nni_ep *ep)
if (rv != 0) {
return (rv);
}
- if (ep->ep_ops.ep_connect != NULL) {
- rv = nni_ep_connect_aio(ep, &pipe->p_tran_data);
- } else {
- rv = ep->ep_ops.ep_connect_sync(ep->ep_data,
- &pipe->p_tran_data);
- }
+ rv = nni_ep_connect_aio(ep, &pipe->p_tran_data);
if (rv != 0) {
nni_pipe_remove(pipe);
return (rv);
@@ -461,12 +456,7 @@ nni_ep_accept_sync(nni_ep *ep)
if (rv != 0) {
return (rv);
}
- if (ep->ep_ops.ep_accept != NULL) {
- rv = nni_ep_accept_aio(ep, &pipe->p_tran_data);
- } else {
- rv = ep->ep_ops.ep_accept_sync(ep->ep_data,
- &pipe->p_tran_data);
- }
+ rv = nni_ep_accept_aio(ep, &pipe->p_tran_data);
if (rv != 0) {
nni_pipe_remove(pipe);
return (rv);
diff --git a/src/core/transport.h b/src/core/transport.h
index 8098e5c2..50da473d 100644
--- a/src/core/transport.h
+++ b/src/core/transport.h
@@ -48,10 +48,7 @@ struct nni_tran_ep {
// ep_connect establishes a connection. It can return errors
// NNG_EACCESS, NNG_ECONNREFUSED, NNG_EBADADDR, NNG_ECONNFAILED,
- // NNG_ETIMEDOUT, and NNG_EPROTO. The first argument is the
- // transport specific endpoint, and the second is a pointer to
- // receive a newly created transport-specific pipe structure.
- int (*ep_connect_sync)(void *, void **);
+ // NNG_ETIMEDOUT, and NNG_EPROTO.
void (*ep_connect)(void *, nni_aio *);
// ep_bind just does the bind() and listen() work,
@@ -61,10 +58,7 @@ struct nni_tran_ep {
// address, or NNG_EACCESS for permission problems.
int (*ep_bind)(void *);
- // ep_accept accepts an inbound connection. The first argument
- // is the transport-specific endpoint, and the second is a pointer to
- // a transport-specific pipe, created by this function.
- int (*ep_accept_sync)(void *, void **);
+ // ep_accept accepts an inbound connection.
void (*ep_accept)(void *, nni_aio *);
// ep_close stops the endpoint from operating altogether. It does