Version0.17.0Verifiednot yet verifiedLicenseBSD-3-Clause

sigil-socket

TCP/UDP socket operations for Sigil

Report a bug or suggest a feature
Readme

sigil-socket

Archived at Sigil 0.19.0: The maintained implementation now lives in codeberg:sigil/sigil. This repository and all tags remain available for provenance, but no further standalone releases will be published.

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.sgl

For 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 --report

License

BSD-3-Clause. See the monorepo for the canonical license text.

Clone

$ git clone https://codeberg.org/sigil/sigil-socket

Releases

v0.17.0 — latest by version, released 11 Jun 2026

All releases — 4 tags in this repository.

Source

Browse the latest source

One page per file, and every line has a permalink.

Recent commitsAtom

The last 20 commits keep a page here. Everything older lives in the clone.