| 93 | #ifdef NET_LOG |
| 94 | |
| 95 | char* NetChannel::getChannelInfo(char* buf) const |
| 96 | { |
| 97 | NET_ERROR(buf); |
| 98 | struct sockaddr_in local; |
| 99 | if (peer) |
| 100 | peer->getLocalAddress(local); |
| 101 | else |
| 102 | Zero(local); |
| 103 | struct sockaddr_in distant; |
| 104 | getDistantAddress(distant); |
| 105 | snprintf(buf, sizeof(buf), "%u.%u.%u.%u:%u <-> %u.%u.%u.%u:%u", (unsigned)IP4(local), (unsigned)IP3(local), |
| 106 | (unsigned)IP2(local), (unsigned)IP1(local), (unsigned)PORT(local), (unsigned)IP4(distant), |
| 107 | (unsigned)IP3(distant), (unsigned)IP2(distant), (unsigned)IP1(distant), (unsigned)PORT(distant)); |
| 108 | return buf; |
| 109 | } |
| 110 | |
| 111 | unsigned NetChannel::getChannelId() const |
| 112 | { |
nothing calls this directly
no test coverage detected