MCPcopy Create free account
hub / github.com/Snapchat/Valdi / getConnectedClients

Method getConnectedClients

valdi/src/valdi/runtime/Debugger/TCPServerImpl.cpp:245–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245std::vector<Ref<ITCPConnection>> TCPServerImpl::getConnectedClients() {
246 std::lock_guard<Mutex> guard(_mutex);
247
248 std::vector<Ref<ITCPConnection>> allConnections;
249 allConnections.reserve(_connections.size());
250
251 for (const auto& connection : _connections) {
252 allConnections.emplace_back(connection);
253 }
254
255 return allConnections;
256}
257
258bool TCPServerImpl::ownsClient(const Ref<ITCPConnection>& client) const {
259 auto disconnectHandler = castOrNull<TCPServerDisconnectHandler>(client->getDisconnectListener());

Callers 2

sendMessageToFrontendMethod · 0.45
submitMessageToJsMethod · 0.45

Calls 2

reserveMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected