An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

code.hybscloud.com/sock

Package sock provides zero-allocation socket types and address machinery for Unix systems in Go. The package uses direct syscalls via the zcall assembly package, bypassing Go's runtime hooks. All sockets are created with SOCK_NONBLOCK and SOCK_CLOEXEC flags. Use sock instead of net when you need: For typical applications where latency is not critical, the standard net package provides a simpler and more portable API. All I/O operations follow the Strike-Spin-Adapt model: By default, operations are non-blocking: When a deadline is set, operations retry with progressive backoff: Errors follow a layered semantic model: The Sockaddr interface is the foundation of zero-allocation address handling: Address types (SockaddrInet4, SockaddrInet6, SockaddrUnix) embed raw kernel structures and return pointers directly—no marshaling, no allocation. All sockets expose iofd.FD via the FD() method for io_uring integration and other async I/O mechanisms. Address conversion functions bridge with the standard net package: Type aliases (Conn, Addr, Listener) provide net.Conn, net.Addr, net.Listener interface compatibility.

Ecosystem
proxy.golang.org
Latest Release
v0.2.1
about 1 month ago
Versions
6
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/code.hybscloud.com/sock
spec
License MIT
Namespace code.hybscloud.com
First Release 3 months ago
Last Synced about 1 month ago
Rankings on proxy.golang.org
Overall Top 5.2%