IsConnected returns whether an agent has an active WebSocket connection.
(agentID string)
| 63 | |
| 64 | // IsConnected returns whether an agent has an active WebSocket connection. |
| 65 | func (h *Hub) IsConnected(agentID string) bool { |
| 66 | h.mu.RLock() |
| 67 | defer h.mu.RUnlock() |
| 68 | return h.conns[agentID] != nil |
| 69 | } |
| 70 | |
| 71 | // Close closes all active connections. |
| 72 | func (h *Hub) Close() { |
no outgoing calls