mirror of https://github.com/gorilla/websocket.git
Expose the SetDeadline function of the underlying connection
This commit is contained in:
parent
adf16b3178
commit
561b74d2fd
5
conn.go
5
conn.go
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue