diff --git a/nbhttp/websocket/conn.go b/nbhttp/websocket/conn.go index a6c5934e..86c76c5c 100644 --- a/nbhttp/websocket/conn.go +++ b/nbhttp/websocket/conn.go @@ -300,6 +300,11 @@ func (c *Conn) SetCompressionLevel(level int) error { return nil } +// The negotiated websocket subprotocol +func (c *Conn) Subprotocol() string { + return c.subprotocol +} + func newConn(u *Upgrader, c net.Conn, subprotocol string, remoteCompressionEnabled bool) *Conn { conn := &Conn{ Conn: c,