Expose internal buffer reader for read raw data

This commit is contained in:
Julien Salleyron 2018-01-04 15:50:20 +01:00
parent d965e9adc6
commit 82792d75a5
1 changed files with 6 additions and 0 deletions

View File

@ -1119,6 +1119,12 @@ func (c *Conn) UnderlyingConn() net.Conn {
return c.conn return c.conn
} }
// BufferReader returns the internal buffer reader. This can be used to read
// the raw data after upgrade success
func (c *Conn) BufferReader() *bufio.Reader {
return c.br
}
// EnableWriteCompression enables and disables write compression of // EnableWriteCompression enables and disables write compression of
// subsequent text and binary messages. This function is a noop if // subsequent text and binary messages. This function is a noop if
// compression was not negotiated with the peer. // compression was not negotiated with the peer.