Expose the SetDeadline function of the underlying connection

This commit is contained in:
Adrian Bordinc 2017-01-05 15:45:16 +01:00
parent adf16b3178
commit 561b74d2fd
1 changed files with 5 additions and 0 deletions

View File

@ -292,6 +292,11 @@ func newConn(conn net.Conn, isServer bool, readBufferSize, writeBufferSize int)
return c
}
func (c *Conn) SetDeadline(t time.Time) error {
c.writeDeadline = t
return c.conn.SetDeadline(t)
}
// Subprotocol returns the negotiated protocol for the connection.
func (c *Conn) Subprotocol() string {
return c.subprotocol