You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
net.Conn.SetDeadlines have to be called on each read and write if the intention is to mimic "idle timeout". Otherwise, the network poller would simply manifest an "i/o timeout" on exceeded deadlines.
This is unfortunate as decorating a *net.TCPConn to extend deadlines on reads/writes means losing out on io.Copy optimization using sendfile for zero-copy ops (ref).
Activity
dialers/retrier: debug log conn deadlines
tcp,udp: fast path for core.Pipe if no idle timeouts set
tcp,udp: impl user-set idle timeouts
ignoramous commentedon Feb 7, 2025
net.Conn.SetDeadlines have to be called on each read and write if the intention is to mimic "idle timeout". Otherwise, the network poller would simply manifest an "i/o timeout" on exceeded deadlines.This is unfortunate as decorating a
*net.TCPConnto extend deadlines on reads/writes means losing out onio.Copyoptimization usingsendfilefor zero-copy ops (ref).