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

Method heartbeat

native/cocos/network/SocketIO.cpp:600–607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

598}
599
600void SIOClientImpl::heartbeat(float /*dt*/) {
601 SocketIOPacket *packet = SocketIOPacket::createPacketWithType("heartbeat", _version);
602
603 this->send(packet);
604 delete packet;
605
606 CC_LOG_INFO("Heartbeat sent");
607}
608
609void SIOClientImpl::send(const ccstd::string &endpoint, const ccstd::string &s) {
610 switch (_version) {

Callers 1

onOpenMethod · 0.95

Calls 1

sendMethod · 0.95

Tested by

no test coverage detected