aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/endpt.c6
-rw-r--r--src/core/transport.h8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/core/endpt.c b/src/core/endpt.c
index c5e479a2..1c5f4db5 100644
--- a/src/core/endpt.c
+++ b/src/core/endpt.c
@@ -106,12 +106,12 @@ nni_endpt_close(nni_endpt *ep)
int
-nni_endpt_listen(nni_endpt *ep)
+nni_endpt_bind(nni_endpt *ep)
{
if (ep->ep_close) {
return (NNG_ECLOSED);
}
- return (ep->ep_ops.ep_listen(ep->ep_data));
+ return (ep->ep_ops.ep_bind(ep->ep_data));
}
@@ -132,7 +132,7 @@ nni_dial_once(nni_endpt *ep)
if ((rv = nni_pipe_create(&pipe, ep->ep_ops.ep_pipe_ops)) != 0) {
return (rv);
}
- if ((rv = ep->ep_ops.ep_dial(ep->ep_data, &pipe->p_data)) != 0) {
+ if ((rv = ep->ep_ops.ep_connect(ep->ep_data, &pipe->p_data)) != 0) {
nni_pipe_destroy(pipe);
return (rv);
}
diff --git a/src/core/transport.h b/src/core/transport.h
index e4f07002..c0bade07 100644
--- a/src/core/transport.h
+++ b/src/core/transport.h
@@ -44,18 +44,18 @@ struct nni_endpt_ops {
// The endpoint will already have been closed.
void (*ep_destroy)(void *);
- // ep_dial starts dialing, and creates a new pipe,
+ // ep_connect establishes a connection, and creates a new pipe,
// which is returned in the final argument. It can return errors
// NNG_EACCESS, NNG_ECONNREFUSED, NNG_EBADADDR, NNG_ECONNFAILED,
// NNG_ETIMEDOUT, and NNG_EPROTO.
- int (*ep_dial)(void *, void **);
+ int (*ep_connect)(void *, void **);
- // ep_listen just does the bind() and listen() work,
+ // ep_bind just does the bind() and listen() work,
// reserving the address but not creating any connections.
// It should return NNG_EADDRINUSE if the address is already
// taken. It can also return NNG_EBADADDR for an unsuitable
// address, or NNG_EACCESS for permission problems.
- int (*ep_listen)(void *);
+ int (*ep_bind)(void *);
// ep_accept accepts an inbound connection, and creates
// a transport pipe, which is returned in the final argument.