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

Method Add

shared/messaging/connection_manager.go:51–60  ·  view source on GitHub ↗
(id string, conn *websocket.Conn)

Source from the content-addressed store, hash-verified

49}
50
51func (cm *ConnectionManager) Add(id string, conn *websocket.Conn) {
52 cm.mutex.Lock()
53 defer cm.mutex.Unlock()
54 cm.connections[id] = &connWrapper{
55 conn: conn,
56 mutex: sync.Mutex{},
57 }
58
59 log.Printf("Added connection for user %s", id)
60}
61
62func (cm *ConnectionManager) Remove(id string) {
63 cm.mutex.Lock()

Callers 2

handleRidersWebSocketFunction · 0.80
handleDriversWebSocketFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected