| 1480 | |
| 1481 | return SendMsgRaw(to, rawMsg, dwFlags, level); |
| 1482 | } |
| 1483 | |
| 1484 | DWORD NetworkComponent::SendMsgRaw(int to, NetworkMessageRaw& rawMsg, NetMsgFlags dwFlags, int diagLevel) |
| 1485 | { |
| 1486 | StatRawMsgSent(to, rawMsg.GetSize()); |
| 1487 | |
| 1488 | static Poseidon::Foundation::CRCCalculator calculator; |
| 1489 | int crc = calculator.CRC(rawMsg.GetData(), rawMsg.GetSize()); |
| 1490 | rawMsg.Put(crc, NCTNone); |
| 1491 | |
| 1492 | GDebugger.PauseCheckingAlive(); |
| 1493 | |
| 1494 | DWORD msgID = 0xFFFFFFFF; |
| 1495 | bool result = DXSendMsg(to, rawMsg, msgID, dwFlags); |
| 1496 | |
| 1497 | int size = rawMsg.GetSize(); |
| 1498 | |
| 1499 | GDebugger.ResumeCheckingAlive(); |
| 1500 | |
| 1501 | if (diagLevel >= 2) |
| 1502 | { |
| 1503 | DiagLogF(" result = %x, message ID = %x, size = %d", result, msgID, size); |
| 1504 | } |
| 1505 | if (!result) |
| 1506 | { |
| 1507 | const PlayerIdentity* ident = FindIdentity(to); |
| 1508 | LOG_ERROR(Network, "Message not sent - error {:x}, message ID = {:x}, to {} ({})", result, msgID, to, |
| 1509 | ident ? (const char*)ident->name : "<no>"); |
| 1510 | return 0xFFFFFFFF; |
| 1511 | } |
| 1512 | return msgID; |
| 1513 | } |
| 1514 |
nothing calls this directly
no test coverage detected