Add SetDeadline docs

This commit is contained in:
Adrian Bordinc 2017-01-05 15:47:55 +01:00
parent 561b74d2fd
commit 6307a35aaf
1 changed files with 2 additions and 0 deletions

View File

@ -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)