From 6fef4c1e5bf73ad76e7cdcfb65540f1308045339 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 2 Oct 2017 17:32:11 -0700 Subject: fixes #5 Address properties Added TCP socket address properties on pipes. This adds the plumbing for the various platform specifics, and includes both v4 and v6 handling. We've included a TCPv6 test as well. --- src/core/platform.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core/platform.h') diff --git a/src/core/platform.h b/src/core/platform.h index 7bfb370a..10074677 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -233,6 +233,12 @@ extern void nni_plat_tcp_pipe_send(nni_plat_tcp_pipe *, nni_aio *); // The platform may modify the iovs. extern void nni_plat_tcp_pipe_recv(nni_plat_tcp_pipe *, nni_aio *); +// nni_plat_tcp_pipe_peername gets the peer name. +extern int nni_plat_tcp_pipe_peername(nni_plat_tcp_pipe *, nni_sockaddr *); + +// nni_plat_tcp_pipe_sockname gets the local name. +extern int nni_plat_tcp_pipe_sockname(nni_plat_tcp_pipe *, nni_sockaddr *); + // nni_plat_tcp_resolv resolves a TCP name asynchronously. The family // should be one of NNG_AF_INET, NNG_AF_INET6, or NNG_AF_UNSPEC. The // first two constrain the name to those families, while the third will -- cgit v1.2.3-70-g09d2