commit d98b7fa8525a32c30c674ba737a952689b52891e
parent f2bf66dec9cf9b3c838bd1b7f4dd392511cdf696
Author: Francesco Saccone <francesco@francescosaccone.com>
Date: Mon, 31 Mar 2025 14:59:09 +0200
docs: specify return values of create_socket
Signed-off-by: Francesco Saccone <francesco@francescosaccone.com>
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/socket.h b/socket.h
@@ -4,6 +4,8 @@
/*
* Creates a socket and a local address at the given port, binds them,
* listens for connections and returns the socket file descriptor.
+ *
+ * Returns -1 in case of an error and the socket file descriptor otherwise.
*/
int
create_socket(unsigned int port);