diff options
Diffstat (limited to 'src/microhttpd/mhd_sockets.h')
-rw-r--r-- | src/microhttpd/mhd_sockets.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/microhttpd/mhd_sockets.h b/src/microhttpd/mhd_sockets.h index c3ca1626..f06da1e5 100644 --- a/src/microhttpd/mhd_sockets.h +++ b/src/microhttpd/mhd_sockets.h | |||
@@ -571,6 +571,21 @@ | |||
571 | 571 | ||
572 | /* Socket functions */ | 572 | /* Socket functions */ |
573 | 573 | ||
574 | #if defined(MHD_POSIX_SOCKETS) && defined(AF_LOCAL) | ||
575 | # define MHD_socket_pair_(fdarr) (!socketpair(AF_LOCAL, SOCK_STREAM, 0, (fdarr))) | ||
576 | #elif defined(MHD_POSIX_SOCKETS) && defined(AF_UNIX) | ||
577 | # define MHD_socket_pair_(fdarr) (!socketpair(AF_UNIX, SOCK_STREAM, 0, (fdarr))) | ||
578 | #elif defined(MHD_WINSOCK_SOCKETS) | ||
579 | /** | ||
580 | * Create pair of mutually connected TCP/IP sockets on loopback address | ||
581 | * @param sockets_pair array to receive resulted sockets | ||
582 | * @return non-zero if succeeded, zero otherwise | ||
583 | */ | ||
584 | int MHD_W32_socket_pair_(SOCKET sockets_pair[2]); | ||
585 | |||
586 | # define MHD_socket_pair_(fdarr) MHD_W32_pair_of_sockets_((fdarr)) | ||
587 | #endif | ||
588 | |||
574 | /** | 589 | /** |
575 | * Add @a fd to the @a set. If @a fd is | 590 | * Add @a fd to the @a set. If @a fd is |
576 | * greater than @a max_fd, set @a max_fd to @a fd. | 591 | * greater than @a max_fd, set @a max_fd to @a fd. |