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 -1
View File
@@ -15,4 +15,7 @@ Writes `data` to the given socket.
The function returns `true` when the write succeeds.
:example
print("socket_write is resource-bound; configure the service or connection, then call it in request code.\n");
u64 fd = socket_connect("127.0.0.1", 80);
bool sent = socket_write(fd, "GET / HTTP/1.0\r\nHost: localhost\r\nConnection: close\r\n\r\n");
socket_close(fd);
print(sent ? "request sent" : "send failed", "\n");