(id string)
| 66 | } |
| 67 | |
| 68 | func (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 | |
| 78 | func (cm *ConnectionManager) SendMessage(id string, message contracts.WSMessage) error { |
| 79 | cm.mutex.RLock() |
nothing calls this directly
no outgoing calls
no test coverage detected