Skip to content

Commit

Permalink
expose gorilla websocket connection
Browse files Browse the repository at this point in the history
  • Loading branch information
fink-al committed Apr 6, 2024
1 parent 87e736d commit 243be3e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,9 @@ func (s *Session) LocalAddr() net.Addr {
func (s *Session) RemoteAddr() net.Addr {
return s.conn.RemoteAddr()
}

// WebsocketConnection returns the underlying websocket connection.
// This can be used to e.g. set/read additional websocket options or to write sychronous messages.
func (s *Session) WebsocketConnection() *websocket.Conn {
return s.conn
}

0 comments on commit 243be3e

Please sign in to comment.