sigil-socket
TCP, UDP, and Unix domain socket operations for Sigil. Provides network socket primitives suitable for both blocking and non-blocking I/O, including integration with Sigil's coroutine-based async runtime.
This package was extracted from the sigil monorepo — the in-tree history under packages/sigil-socket/ is preserved here as master.
Usage
(import (sigil socket))
;; TCP client
(let ((sock (tcp-connect "example.com" 80)))
(socket-write-line sock "GET / HTTP/1.0")
(socket-write-line sock "")
(display (socket-read-all sock))
(socket-close sock))
;; TCP server
(let ((server (tcp-listen 8080)))
(let loop ()
(let ((client (tcp-accept server)))
(socket-write-line client "Hello!")
(socket-close client)
(loop))))
;; UDP
(let ((sock (udp-socket)))
(udp-send sock "127.0.0.1" 5000 "Hello")
(socket-close sock))The full export list lives at the top of src/sigil/socket.sgl. See docs/socket.md for a usage guide.
Build & test
This is a pure-Scheme package. No native build step.
sigil deps install # fetch sigil-stdlib via codeberg:sigil/sigil-lang
sigil test --report # run test/test-socket.sglFor local development against an unpublished sigil-lang, use dev-redirects.sgl (sibling checkout at ../sigil-lang/):
sigil deps install --redirects ./dev-redirects.sgl
sigil test --redirects ./dev-redirects.sgl --reportLicense
BSD-3-Clause. See the monorepo for the canonical license text.
$ git clone https://codeberg.org/sigil/sigil-socket
v0.17.0 — latest by version, released 11 Jun 2026
All releases — 4 tags in this repository.
One page per file, and every line has a permalink.
Bump sigil-socket to Sigil 0.16
6b9e36eb
b55714d3
993b00b6
The last 20 commits keep a page here. Everything older lives in the clone.