diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/aio.c | 4 | ||||
| -rw-r--r-- | src/core/aio.h | 3 | ||||
| -rw-r--r-- | src/core/platform.h | 13 |
3 files changed, 11 insertions, 9 deletions
diff --git a/src/core/aio.c b/src/core/aio.c index fe9bcde8..5b8c7970 100644 --- a/src/core/aio.c +++ b/src/core/aio.c @@ -73,10 +73,6 @@ nni_aio_fini(nni_aio *aio) // At this point the AIO is done. nni_cv_fini(&aio->a_cv); - - if ((aio->a_naddrs != 0) && (aio->a_addrs != NULL)) { - NNI_FREE_STRUCTS(aio->a_addrs, aio->a_naddrs); - } } // nni_aio_stop cancels any oustanding operation, and waits for the diff --git a/src/core/aio.h b/src/core/aio.h index aabb3fa9..9114c9fe 100644 --- a/src/core/aio.h +++ b/src/core/aio.h @@ -50,8 +50,7 @@ struct nni_aio { void *a_pipe; // opaque pipe handle // Resolver operations. - nni_sockaddr *a_addrs; - int a_naddrs; + nni_sockaddr *a_addr; // Provider-use fields. nni_aio_cancelfn a_prov_cancel; diff --git a/src/core/platform.h b/src/core/platform.h index 6e049bb3..02ea9a11 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -192,8 +192,10 @@ extern void nni_plat_fini(void); typedef struct nni_plat_tcp_ep nni_plat_tcp_ep; typedef struct nni_plat_tcp_pipe nni_plat_tcp_pipe; -// nni_plat_tcp_ep_init creates a new endpoint associated with the url. -extern int nni_plat_tcp_ep_init(nni_plat_tcp_ep **, const char *, int); +// nni_plat_tcp_ep_init creates a new endpoint associated with the local +// and remote addresses. +extern int nni_plat_tcp_ep_init( + nni_plat_tcp_ep **, const nni_sockaddr *, const nni_sockaddr *, int); // nni_plat_tcp_ep_fini closes the endpoint and releases resources. extern void nni_plat_tcp_ep_fini(nni_plat_tcp_ep *); @@ -240,6 +242,11 @@ extern void nni_plat_tcp_pipe_recv(nni_plat_tcp_pipe *, nni_aio *); extern void nni_plat_tcp_resolv( const char *, const char *, int, int, nni_aio *); +// nni_plat_udp_resolve is just like nni_plat_tcp_resolve, but looks up +// service names using UDP. +extern void nni_plat_udp_resolv( + const char *, const char *, int, int, nni_aio *); + // // IPC (UNIX Domain Sockets & Named Pipes) Support. // @@ -248,7 +255,7 @@ typedef struct nni_plat_ipc_ep nni_plat_ipc_ep; typedef struct nni_plat_ipc_pipe nni_plat_ipc_pipe; // nni_plat_ipc_ep_init creates a new endpoint associated with the url. -extern int nni_plat_ipc_ep_init(nni_plat_ipc_ep **, const char *, int); +extern int nni_plat_ipc_ep_init(nni_plat_ipc_ep **, const nni_sockaddr *, int); // nni_plat_ipc_ep_fini closes the endpoint and releases resources. extern void nni_plat_ipc_ep_fini(nni_plat_ipc_ep *); |
