summaryrefslogtreecommitdiff
path: root/doc/socket_functions.rst
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2022-10-24 21:03:43 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-10-24 21:03:43 +0200
commitaab49e5a013c53ae812a143fe41add74e0677a61 (patch)
treef0c6e1ba7db9991f2bd38c9169f9921bfe5e61d8 /doc/socket_functions.rst
parentdf5167db909a88fb8e16dd20b37442495a6ac059 (diff)
parent532d4a24e2013262dfa41fd85c06a9715c99abf7 (diff)
Update upstream source from tag 'upstream/4.7'
Update to upstream version '4.7' with Debian dir d3e11463c915e5c39507206197eb3acd42bb8f5f
Diffstat (limited to 'doc/socket_functions.rst')
-rw-r--r--doc/socket_functions.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/socket_functions.rst b/doc/socket_functions.rst
new file mode 100644
index 0000000..fe2b69d
--- /dev/null
+++ b/doc/socket_functions.rst
@@ -0,0 +1,16 @@
+================
+Socket functions
+================
+
+.. code-block:: c
+
+ #include <libHX/socket.h>
+
+ int HX_socket_from_env(const struct addrinfo *ai, const char *intf);
+
+``HX_socket_from_env``
+ The function looks up the current process's file descriptors for a
+ socket that is listening and which matches the given addrinfo and
+ (optionally) intf if the latter is not NULL``. Upon success, the fd
+ number is returned, or -1 if no file descriptor matched. No errors are
+ signalled.