per-connection TCP keepalive options[1]; we can turn them on via the net
library, but can't configure the delay, which per the RFC cannot default to
anything less than two hours. I propose the following addition to
go.net/ipv4 (and ipv6?):
// SetKeepalive configures the per-connection keepalive settings to start
sending
// keepalives after the given duration and every interval until count have
been sent
// without an ack, after which time the connection will be reset.
func (c *Conn) SetKeepalive(after, interval time.Duration, count int) error
Alternately, a less direct transliteration would be:
// SetKeepalive configures the per-connection keepalive settings to start
sending
// keepalives after the given duration and every interval until max time
has passed from
// the first keepalive, after which time the connection will be reset. It
is an error for max
// to be anything but a multiple of interval.
func (c *Conn) SetKeepalive(after, max, interval time.Duration) error
... and the corresponding Keepalive() function with corresponding return
values.
Does anyone have strong feelings about this? Should I work on a CL or is
this something I should just do for myself?
[1] http://tools.ietf.org/html/rfc1122#page-101
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.