Skip to content

Commit

Permalink
Merge pull request #202 from om26er/expose-subproto
Browse files Browse the repository at this point in the history
Expose the websocket subprotocol
  • Loading branch information
lesismal authored Aug 15, 2022
2 parents 2f11bbf + e94a65b commit 1f7055d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nbhttp/websocket/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1f7055d

Please sign in to comment.