diff options
| author | Garrett D'Amore <garrett@damore.org> | 2020-10-31 18:47:07 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2020-10-31 23:10:12 -0700 |
| commit | 452ecf5ae83adc9ae77518746f4f81171c42248c (patch) | |
| tree | d81730eef3c19775abf0715831dc18e3f9885d21 /src/platform/windows/win_tcpdial.c | |
| parent | 587bc765ee69acfabf3bc8b88a70806c07b61f87 (diff) | |
| download | nng-452ecf5ae83adc9ae77518746f4f81171c42248c.tar.gz nng-452ecf5ae83adc9ae77518746f4f81171c42248c.tar.bz2 nng-452ecf5ae83adc9ae77518746f4f81171c42248c.zip | |
fixes #1311 reduce wasted use for nni_aio
fixes #1317 IPv6 listener get port is incorrect
fixes #1319 Want symbolic service names
This is phase 1 of reducing the memory foot-print of aios, and
also of pipes. This removes the largest consumer the socket
address information, from the aio, which was only used by a few
consumers.
Diffstat (limited to 'src/platform/windows/win_tcpdial.c')
| -rw-r--r-- | src/platform/windows/win_tcpdial.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/platform/windows/win_tcpdial.c b/src/platform/windows/win_tcpdial.c index 3d470ca1..89c5bf6a 100644 --- a/src/platform/windows/win_tcpdial.c +++ b/src/platform/windows/win_tcpdial.c @@ -173,22 +173,19 @@ tcp_dial_cb(nni_win_io *io, int rv, size_t cnt) } void -nni_tcp_dial(nni_tcp_dialer *d, nni_aio *aio) +nni_tcp_dial(nni_tcp_dialer *d, const nni_sockaddr *sa, nni_aio *aio) { SOCKET s; SOCKADDR_STORAGE ss; int len; nni_tcp_conn * c; int rv; - nng_sockaddr sa; - - nni_aio_get_sockaddr(aio, &sa); if (nni_aio_begin(aio) != 0) { return; } - if ((len = nni_win_nn2sockaddr(&ss, &sa)) <= 0) { + if ((len = nni_win_nn2sockaddr(&ss, sa)) <= 0) { nni_aio_finish_error(aio, NNG_EADDRINVAL); return; } |
