MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / sendUdpMessage

Method sendUdpMessage

LuaSTGPlus/RemoteDebuggerClient.cpp:36–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36void RemoteDebuggerClient::sendUdpMessage(UdpMessageType type, std::shared_ptr<Value> val)
37{
38 m_SendPacketCache->VDict["msgType"] = make_shared<Value>(static_cast<int>(type));
39 m_SendPacketCache->VDict["args"] = val;
40
41 Encoder tEncoder;
42 tEncoder << *m_SendPacketCache;
43 const std::string& tData = *tEncoder;
44
45 struct sockaddr_in tEndpoint;
46 int tEndpointLen = sizeof(tEndpoint);
47 memset(&tEndpoint, 0, sizeof(tEndpoint));
48 tEndpoint.sin_family = AF_INET;
49 tEndpoint.sin_port = htons(m_DebuggerPort); // �����˿�
50 tEndpoint.sin_addr.S_un.S_addr = m_DebuggerAddr;
51
52 // ��������sendto�ɹ����
53 sendto(S, tData.c_str(), tData.size(), 0, (sockaddr*)&tEndpoint, tEndpointLen);
54}
55
56void RemoteDebuggerClient::SendPerformanceCounter(float FPS, float ObjCount, float FrameTime, float RenderTime)
57{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected