summaryrefslogtreecommitdiff
path: root/os.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-08 19:16:37 -0400
committerpommicket <pommicket@gmail.com>2023-09-08 19:16:37 -0400
commitf86b0aa1e843646056c08a91fcc759aa0d8a57ba (patch)
tree49a48c14c167df8614996d0c5b8d026fc99fc627 /os.h
parent100859239a28c2709bb3e2cdce347300a2b763e2 (diff)
better LSP over TCP
Diffstat (limited to 'os.h')
-rw-r--r--os.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/os.h b/os.h
index a937b40..bb52d63 100644
--- a/os.h
+++ b/os.h
@@ -188,6 +188,12 @@ long long socket_read(Socket *socket, char *data, size_t size);
/// -1 if the read end of the socket was closed\n
/// or a non-negative number indicating the number of bytes written.
long long socket_write(Socket *socket, const char *data, size_t size);
+/// close socket
+///
+/// if `*psocket` is `NULL`, this does nothing.
+///
+/// sets `*psocket` to `NULL`.
+void socket_close(Socket **psocket);
#endif // OS_H_