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

Method sendAsyn

bwapi/SNP_DirectIP/SNP/DirectIP.cpp:139–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137 session.sendPacket(host, sendBuffer.getFrameUpto(ping_server));
138 }
139 void DirectIP::sendAsyn(const UDPAddr& him, Util::MemoryFrame packet)
140 {
141
142 processIncomingPackets();
143
144 // create header
145 char sendBufferBytes[600];
146 Util::MemoryFrame sendBuffer(sendBufferBytes, 600);
147 Util::MemoryFrame spacket = sendBuffer;
148 spacket.writeAs<int>(PacketType_GamePacket);
149 spacket.write(packet);
150
151 // send packet
152 session.sendPacket(him, sendBuffer.getFrameUpto(spacket));
153 }
154 void DirectIP::receive()
155 {
156 processIncomingPackets();

Callers

nothing calls this directly

Calls 3

sendPacketMethod · 0.80
getFrameUptoMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected