From 9c6b2929d8019dcc11935550bc3520ae39c2964e Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 30 Dec 2024 11:45:36 -0800 Subject: fixes #863 socket activation: for TCP and IPC (POSIX only) This introduces a new option "NNG_OPT_LISTEN_FD", understood by TCP, TLS, and (on POSIX systems) IPC. This option is used to pass a file descriptor or handle (Windows) that is already listening (ready for ACCEPT to be called). For TCP and TLS, the socket must be of type AF_INET or AF_INET6, and for IPC it must be of type AF_UNIX. --- src/platform/posix/posix_debug.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/platform/posix/posix_debug.c') diff --git a/src/platform/posix/posix_debug.c b/src/platform/posix/posix_debug.c index 912000cc..3c0a6604 100644 --- a/src/platform/posix/posix_debug.c +++ b/src/platform/posix/posix_debug.c @@ -90,6 +90,9 @@ static struct { { ENFILE, NNG_ENOFILES }, { EMFILE, NNG_ENOFILES }, { EEXIST, NNG_EEXIST }, +#ifdef ENOTSOCK + { ENOTSOCK, NNG_EINVAL }, +#endif // must be last { 0, 0 }, // clang-format on -- cgit v1.2.3-70-g09d2