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

Function spiSend

bwapi/SNP_DirectIP/SNP/SNPModule.cpp:392–420  ·  view source on GitHub ↗

------------------------------------------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

390 }
391 //------------------------------------------------------------------------------------------------------------------------------------
392 BOOL __stdcall spiSend(DWORD addrCount, SOCKADDR * *addrList, char *buf, DWORD bufLen)
393 {
394// DropMessage(0, "spiSend %d", GetCurrentThreadId());
395
396 if(!addrCount)
397 return TRUE;
398
399 if(addrCount > 1)
400 DropMessage(1, "spiSend, multicast not supported");
401
402 try
403 {
404 // support for 1 peer for now
405 SOCKADDR him = *(addrList[0]);
406
407 // send packet over the network module
408 pluggedNetwork->sendAsyn(him, Util::MemoryFrame(buf, bufLen));
409
410 // debug
411// DropMessage(0, "Sent storm packet %d bytes", bufLen);
412// DropMessage(0, "S> %s", sprintfBytes(buf, bufLen));
413 }
414 catch(GeneralException &e)
415 {
416 DropLastError("spiSend failed: %s", e.getMessage());
417 return FALSE;
418 }
419 return TRUE;
420 }
421 //------------------------------------------------------------------------------------------------------------------------------------
422 BOOL __stdcall spiReceive(SOCKADDR **senderPeer, char **data, DWORD *databytes)
423 {

Callers

nothing calls this directly

Calls 5

DropMessageFunction · 0.85
MemoryFrameClass · 0.85
DropLastErrorFunction · 0.85
getMessageMethod · 0.80
sendAsynMethod · 0.45

Tested by

no test coverage detected