From 243be3e61b3f516be788f8e75a4a122faf552101 Mon Sep 17 00:00:00 2001 From: fink-al Date: Sat, 6 Apr 2024 19:25:20 +0200 Subject: [PATCH] expose gorilla websocket connection --- session.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/session.go b/session.go index 36de197..2dbc4a8 100644 --- a/session.go +++ b/session.go @@ -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 +}