MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / SendReply_ControllerCount

Method SendReply_ControllerCount

NetworkServer.cpp:919–937  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917}
918
919void NetworkServer::SendReply_ControllerCount(SOCKET client_sock)
920{
921 NetPacketHeader reply_hdr;
922 unsigned int reply_data;
923
924 reply_hdr.pkt_magic[0] = 'O';
925 reply_hdr.pkt_magic[1] = 'R';
926 reply_hdr.pkt_magic[2] = 'G';
927 reply_hdr.pkt_magic[3] = 'B';
928
929 reply_hdr.pkt_dev_idx = 0;
930 reply_hdr.pkt_id = NET_PACKET_ID_REQUEST_CONTROLLER_COUNT;
931 reply_hdr.pkt_size = sizeof(unsigned int);
932
933 reply_data = controllers.size();
934
935 send(client_sock, (const char *)&reply_hdr, sizeof(NetPacketHeader), 0);
936 send(client_sock, (const char *)&reply_data, sizeof(unsigned int), 0);
937}
938
939void NetworkServer::SendReply_ControllerData(SOCKET client_sock, unsigned int dev_idx, unsigned int protocol_version)
940{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected