MCPcopy Create free account
hub / github.com/codealong-dev/ride-sharing / connWrapper

Struct connWrapper

shared/messaging/connection_manager.go:20–23  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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
20type connWrapper struct {
21 conn *websocket.Conn
22 mutex sync.Mutex
23}
24
25type ConnectionManager struct {
26 connections map[string]*connWrapper // Local connections storage (userId -> connection)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected