connWrapper is a wrapper around the websocket connection to allow for thread-safe operations This is necessary because the websocket connection is not thread-safe
| 18 | // connWrapper is a wrapper around the websocket connection to allow for thread-safe operations |
| 19 | // This is necessary because the websocket connection is not thread-safe |
| 20 | type connWrapper struct { |
| 21 | conn *websocket.Conn |
| 22 | mutex sync.Mutex |
| 23 | } |
| 24 | |
| 25 | type ConnectionManager struct { |
| 26 | connections map[string]*connWrapper // Local connections storage (userId -> connection) |
nothing calls this directly
no outgoing calls
no test coverage detected