MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / SendMsg

Method SendMsg

engine/Poseidon/Network/NetworkMisc.cpp:722–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

720 "Total free %d KB\n"
721 "Free blocks %d, Max free size %d KB",
722 size/1024,
723 heap->Size()/1024,
724 heap->TotalFreeLeft()/1024,
725 heap->CountFreeLeft(),
726 heap->MaxFreeLeft()/1024
727 );
728#else
729 ErrorMessage
730 (
731 "Network: Out of reserved memory (%d KB).\n",
732 size/1024
733 );
734#endif
735}
736#endif
737
738// high level transfer functions
739
740DWORD NetworkComponent::SendMsg(int to, NetworkSimpleObject* object, NetMsgFlags dwFlags)
741{
742 if (!object)
743 {
744 return 0xFFFFFFFF;
745 }
746
747 // prepare format
748 NetworkMessageType type = object->GetNMType();
749 NetworkMessageFormatBase* format = GetFormat(/*to, */ type);
750 if (!format)
751 {
752 if (DiagLevel >= 1)
753 {
754 DiagLogF("Warning: Format not found");
755 }
756 return 0xFFFFFFFF;

Callers 1

SendRadioMessageMethod · 0.45

Calls 3

DiagLogFFunction · 0.85
GetNMTypeMethod · 0.45
TransferMsgMethod · 0.45

Tested by

no test coverage detected