From 82792d75a5edfdc39392eb7668b5a67068271cea Mon Sep 17 00:00:00 2001 From: Julien Salleyron Date: Thu, 4 Jan 2018 15:50:20 +0100 Subject: [PATCH] Expose internal buffer reader for read raw data --- conn.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conn.go b/conn.go index b54ef65..80aa481 100644 --- a/conn.go +++ b/conn.go @@ -1119,6 +1119,12 @@ func (c *Conn) UnderlyingConn() net.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 // subsequent text and binary messages. This function is a noop if // compression was not negotiated with the peer.