aboutsummaryrefslogtreecommitdiff
path: root/src/platform/windows/win_tcp.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-10-25 11:43:59 -0700
committerGarrett D'Amore <garrett@damore.org>2025-10-25 20:11:51 -0700
commitcc419cf01d9c060a3bd3fc318f9b9bc9e736dae9 (patch)
tree2f26cd782a54bed35e03b451003deee5df701983 /src/platform/windows/win_tcp.h
parentebc479a61b8f2d2f3a6d846d18debfb9022e6010 (diff)
downloadnng-cc419cf01d9c060a3bd3fc318f9b9bc9e736dae9.tar.gz
nng-cc419cf01d9c060a3bd3fc318f9b9bc9e736dae9.tar.bz2
nng-cc419cf01d9c060a3bd3fc318f9b9bc9e736dae9.zip
Add stream direct address functions for socket addresses.
This is going to be used to facilitate debugging, and eliminate some inconveniences around these things. We plan to move the pipe functions to use these directly, hopefully moving away from the pipe_getopt hack. (The transport API will need to grow these. For now this is just the streams.)
Diffstat (limited to 'src/platform/windows/win_tcp.h')
-rw-r--r--src/platform/windows/win_tcp.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/platform/windows/win_tcp.h b/src/platform/windows/win_tcp.h
index ec8ab80c..698160b2 100644
--- a/src/platform/windows/win_tcp.h
+++ b/src/platform/windows/win_tcp.h
@@ -1,5 +1,5 @@
//
-// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2025 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
// Copyright 2019 Devolutions <info@devolutions.net>
//
@@ -14,30 +14,30 @@
// This header file is private to the TCP support for Windows.
-#include "core/nng_impl.h"
+#include "../../core/nng_impl.h"
struct nni_tcp_conn {
- nng_stream ops;
- SOCKET s;
- nni_win_io recv_io;
- nni_win_io send_io;
- nni_win_io conn_io;
- nni_list recv_aios;
- nni_list send_aios;
- nni_aio *conn_aio;
- SOCKADDR_STORAGE sockname;
- SOCKADDR_STORAGE peername;
- nni_tcp_dialer *dialer;
- void *listener;
- int recv_rv;
- int send_rv;
- int conn_rv;
- bool closed;
- char buf[512]; // to hold acceptex results
- bool sending;
- bool recving;
- nni_mtx mtx;
- nni_cv cv;
+ nng_stream ops;
+ SOCKET s;
+ nni_win_io recv_io;
+ nni_win_io send_io;
+ nni_win_io conn_io;
+ nni_list recv_aios;
+ nni_list send_aios;
+ nni_aio *conn_aio;
+ nng_sockaddr sockname;
+ nng_sockaddr peername;
+ nni_tcp_dialer *dialer;
+ void *listener;
+ int recv_rv;
+ int send_rv;
+ int conn_rv;
+ bool closed;
+ char buf[512]; // to hold acceptex results
+ bool sending;
+ bool recving;
+ nni_mtx mtx;
+ nni_cv cv;
};
extern int nni_win_tcp_init(nni_tcp_conn **, SOCKET);