mdlayher / raw

Package raw enables reading and writing data at the device driver level for a network interface. MIT Licensed.
MIT License
425 stars 71 forks source link

raw: add Config.NoTimeouts option, implement on Linux #28

Closed mdlayher closed 6 years ago

mdlayher commented 6 years ago

For an internal use case at DigitalOcean, we don't need the timeout capabilities of this package. With timeouts, system calls are performed repeatedly to keep checking the socket for readiness.

This implements a new configuration option (on Linux only for now, but the same could be ported to BSD) that completely disables setting socket timeouts, avoiding a syscall busy loop.