MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / IsConnected

Method IsConnected

internal/ws/hub.go:65–69  ·  view source on GitHub ↗

IsConnected returns whether an agent has an active WebSocket connection.

(agentID string)

Source from the content-addressed store, hash-verified

63
64// IsConnected returns whether an agent has an active WebSocket connection.
65func (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.
72func (h *Hub) Close() {

Callers 11

TestHubCloseFunction · 0.95
TestHubConcurrencyFunction · 0.95
deliverToAgentMethod · 0.80
waitConnectedFunction · 0.80
waitWSConnectedMethod · 0.80
waitWSDisconnectedMethod · 0.80

Calls

no outgoing calls

Tested by 10

TestHubCloseFunction · 0.76
TestHubConcurrencyFunction · 0.76
waitConnectedFunction · 0.64
waitWSConnectedMethod · 0.64
waitWSDisconnectedMethod · 0.64