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

Method Get

shared/messaging/connection_manager.go:68–76  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

66}
67
68func (cm *ConnectionManager) Get(id string) (*websocket.Conn, bool) {
69 cm.mutex.RLock()
70 defer cm.mutex.RUnlock()
71 wrapper, exists := cm.connections[id]
72 if !exists {
73 return nil, false
74 }
75 return wrapper.conn, true
76}
77
78func (cm *ConnectionManager) SendMessage(id string, message contracts.WSMessage) error {
79 cm.mutex.RLock()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected