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

Method channelToPlayer

engine/Poseidon/Network/NetTransportNet.cpp:2503–2529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2501 maxMessage > NetTransportReliableFragmentPayload ? NetTransportReliableFragmentPayload : maxMessage;
2502 if ((!vim || to == DPNID_ALL_PLAYERS_GROUP) && bufferSize > maxMessage)
2503 {
2504#ifdef NET_LOG_MERGE
2505 unsigned chId = 0;
2506 if (to != DPNID_ALL_PLAYERS_GROUP && users.get(to, channel))
2507 chId = channel->getChannelId();
2508#ifdef NET_LOG_BRIEF
2509 NetLog("Ch(%u):tooLargeS(%d,%d,%x)", chId, to, bufferSize, (unsigned)flags);
2510#else
2511 NetLog("Channel(%u): NetServer::SendMsg: trying to send too large non-guaranteed message (to=%d, len=%3d, "
2512 "flags=%x)",
2513 chId, to, bufferSize, (unsigned)flags);
2514#endif
2515#endif
2516 RptF("NetServer: trying to send too large non-guaranteed message (%d bytes long)", bufferSize);
2517 return false;
2518 }
2519 unsigned16 fl = 0;
2520 if (vim)
2521 {
2522 fl |= MSG_VIM_FLAG;
2523 }
2524 if (urgent)
2525 {
2526 fl |= MSG_URGENT_FLAG;
2527 }
2528
2529 enterUsr();
2530 if (to == DPNID_ALL_PLAYERS_GROUP)
2531 { // broadcast to all players
2532#ifdef NET_LOG_SERVER_SEND

Callers 2

serverReceiveFunction · 0.80
ctrlReceiveFunction · 0.80

Calls 2

getFirstMethod · 0.45
getNextMethod · 0.45

Tested by

no test coverage detected