Documentation
¶
Overview ¶
Package sock_test provides user-facing examples for using `code.hybscloud.com/sock`.
The examples stay at the same boundary available to application code. They create sockets with `sock`, observe `iox.ErrWouldBlock` in pure non-blocking mode, use `iox.Backoff` in caller-owned retry loops, enable deadline-driven adaptive retry inside `sock`, and hand raw file descriptors to caller-owned loops or runtimes above `sock`.
Reading Order ¶
Start with these files:
- `tcp_test.go` for stream dial/listen flow, adaptive deadlines, and non-blocking semantics.
- `udp_test.go` for unconnected and connected datagram flow.
- `event_loop_test.go` for manual accept loops, `iox.Backoff`, `FD().Raw()`, and the boundary to `uring` or higher runtimes such as `urex`.
Run the examples with:
go test -v code.hybscloud.com/sock/examples
Click to show internal directories.
Click to hide internal directories.