GetConnectedClients returns all currently connected profile clients.
()
| 199 | |
| 200 | // GetConnectedClients returns all currently connected profile clients. |
| 201 | func (m *GroupClientManager) GetConnectedClients() []*ProfileClient { |
| 202 | m.mu.RLock() |
| 203 | defer m.mu.RUnlock() |
| 204 | |
| 205 | connected := make([]*ProfileClient, 0, len(m.clients)) |
| 206 | for _, pc := range m.clients { |
| 207 | if status, _ := pc.GetStatus(); status == ProfileStatusConnected { |
| 208 | connected = append(connected, pc) |
| 209 | } |
| 210 | } |
| 211 | return connected |
| 212 | } |
| 213 | |
| 214 | // GetAllClients returns all clients regardless of status. |
| 215 | func (m *GroupClientManager) GetAllClients() []*ProfileClient { |
no test coverage detected