MCPcopy Create free account
hub / github.com/bwapi/bwapi / requestAds

Method requestAds

bwapi/SNP_DirectIP/SNP/DirectIP.cpp:122–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120 session.release();
121 }
122 void DirectIP::requestAds()
123 {
124 rebind();
125 processIncomingPackets();
126
127 // send game state request
128 char sendBufferBytes[600];
129 Util::MemoryFrame sendBuffer(sendBufferBytes, 600);
130 Util::MemoryFrame ping_server = sendBuffer;
131 ping_server.writeAs<int>(PacketType_RequestGameStats);
132
133 UDPAddr host;
134 host.sin_family = AF_INET;
135 host.sin_addr.s_addr = inet_addr(getHostIPString());
136 host.sin_port = htons(atoi(getHostPortString()));
137 session.sendPacket(host, sendBuffer.getFrameUpto(ping_server));
138 }
139 void DirectIP::sendAsyn(const UDPAddr& him, Util::MemoryFrame packet)
140 {
141

Callers

nothing calls this directly

Calls 5

rebindFunction · 0.85
getHostIPStringFunction · 0.85
getHostPortStringFunction · 0.85
sendPacketMethod · 0.80
getFrameUptoMethod · 0.80

Tested by

no test coverage detected