| 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 | |
| 1467 | NetStatus 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 | { |
no test coverage detected