cleanup, docs

This commit is contained in:
root
2026-06-16 23:02:45 +00:00
parent ea08d5f28b
commit b8b56cf3dd
160 changed files with 1076 additions and 511 deletions
+4 -2
View File
@@ -1,5 +1,5 @@
:sig
u64 socket_connect(String host, short port)
u64 socket_connect(String host, u16 port)
:params
host : host name
@@ -15,4 +15,6 @@ Opens a socket connection to the given `host` and `port`.
The returned socket handle is then used with `socket_read()`, `socket_write()`, and `socket_close()`.
:example
print("socket_connect is resource-bound; configure the service or connection, then call it in request code.\n");
u64 fd = socket_connect("127.0.0.1", 80);
print(fd != 0 ? "connected to the local server" : "connect failed", "\n");
socket_close(fd);