Skip to content

Commit

Permalink
Merge pull request #91 from fink-al/patch_expose_conn
Browse files Browse the repository at this point in the history
Allow more specific usage/configuration by exposing the underlying websocket connection object
  • Loading branch information
olahol authored Apr 16, 2024
2 parents b1236e7 + 243be3e commit 01879ee
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 01879ee

Please sign in to comment.