MCPcopy Create free account
hub / github.com/cocos/cocos-engine / getConnections

Method getConnections

native/cocos/network/WebSocketServer.cpp:271–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271ccstd::vector<std::shared_ptr<WebSocketServerConnection>> WebSocketServer::getConnections() const {
272 std::lock_guard<std::mutex> guard(_connsMtx);
273 ccstd::vector<std::shared_ptr<WebSocketServerConnection>> ret;
274 for (auto itr : _conns) {
275 ret.emplace_back(itr.second);
276 }
277 return ret;
278}
279
280void WebSocketServer::onCreateClient(struct lws *wsi) {
281 LOGE();

Callers 6

onClientConnectedMethod · 0.80
sendMessageMethod · 0.80
sendDeviceInfoMethod · 0.80
sendPoseInfoMethod · 0.80
sendControllerKeyInfoMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected