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

Method GetConnectionInfo

engine/Poseidon/Network/NetTransportNet.cpp:1447–1470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1445 { // initial hand-shake (to initialize band-width)
1446 channel->checkConnectivity(0);
1447 struct sockaddr_in distant;
1448 channel->getDistantAddress(distant);
1449 port = ntohs(distant.sin_port);
1450 }
1451
1452#ifdef NET_LOG_CLIENT
1453#ifdef NET_LOG_BRIEF
1454 NetLog("Ch(%u):cli(%s,%.3f,%d)", channel->getChannelId(), (ackPlayer == CRNone) ? "failed" : "connected",
1455 1.e-6 * (now - timeout + 1000 * ACK_PLAYER_TIMEOUT), playerNo);
1456#else
1457 NetLog("Channel(%u): NetClient::Init: %s after %.3f seconds (playerID=%d)", channel->getChannelId(),
1458 (ackPlayer == CRNone) ? "failed" : "connected", 1.e-6 * (now - timeout + 1000 * ACK_PLAYER_TIMEOUT),
1459 playerNo);
1460#endif
1461#endif
1462 ConnectResult result = (ackPlayer == CRNone) ? CRError : (ConnectResult)ackPlayer;
1463 leaveSnd();
1464 return result;
1465}
1466
1467NetStatus clientSendComplete(NetMessage* msg, NetStatus event, void* data)
1468// data -> NetClient instance
1469// thread-safe
1470{
1471 NetClient* client = (NetClient*)data;
1472 if (!client || !msg || client->sessionTerminated)
1473 {

Callers 2

EstimateBandwidthMethod · 0.80
EstimateBandwidthMethod · 0.80

Calls 9

IsDedicatedServerFunction · 0.85
getSystemTimeFunction · 0.85
getLatencyMethod · 0.80
getOutputBandWidthMethod · 0.80
getChannelIdMethod · 0.80
droppedMethod · 0.80
getMethod · 0.45
getFirstMethod · 0.45
getNextMethod · 0.45

Tested by

no test coverage detected