From 6307a35aaf5cc169cd3c95f843d2d23d91c27314 Mon Sep 17 00:00:00 2001 From: Adrian Bordinc Date: Thu, 5 Jan 2017 15:47:55 +0100 Subject: [PATCH] Add SetDeadline docs --- conn.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conn.go b/conn.go index 866d8ae..6b3db55 100644 --- a/conn.go +++ b/conn.go @@ -292,6 +292,8 @@ func newConn(conn net.Conn, isServer bool, readBufferSize, writeBufferSize int) return c } +// SetDeadline sets the read and write deadline on the underlying network connection +// It is equivalent to calling both SetReadDeadline and SetWriteDeadline. func (c *Conn) SetDeadline(t time.Time) error { c.writeDeadline = t return c.conn.SetDeadline(t)