| 917 | } |
| 918 | |
| 919 | void 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 | |
| 939 | void NetworkServer::SendReply_ControllerData(SOCKET client_sock, unsigned int dev_idx, unsigned int protocol_version) |
| 940 | { |