sock v0.2.0 — Linux socket options and UDP batch operations #21
hayabusa-cloud
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Introduction
sockprovides zero-overhead, non-blocking socket primitives for high-performance network programming in Go. Built on top ofzcallfor direct syscall access, sock delivers TCP, UDP, SCTP, and Unix domain socket support with semantic error handling and adaptive I/O patterns.The package implements the Strike-Spin-Adapt model for I/O operations: direct syscalls for immediate completion, spin-waiting for short delays, and adaptive backoff for longer waits. All operations are non-blocking by default, returning
iox.ErrWouldBlockwhen data is not immediately available.socksupports Linux-specific optimizations including zero-copy sends (SO_ZEROCOPY), TCP Fast Open, UDP segmentation offload (GSO/GRO), and batch message operations (sendmmsg/recvmmsg).Usage
Highlights
This release adds Linux-specific socket options for performance tuning and introduces UDP batch operations for high-throughput packet processing. Bug fixes improve abstract Unix socket handling and EINTR resilience.
What's Changed
Bug Fixes
Features
Improvements
Compatibility
This discussion was created from the release sock v0.2.0 — Linux socket options and UDP batch operations.
Beta Was this translation helpful? Give feedback.
All reactions