SLikeSoft / SLikeNet

SLikeNetâ„¢ is an Open Source/Free Software cross-platform network engine written in C++ and specifially designed for games (and applications which have comparable requirements on a network engine like games) building upon the discontinued RakNet network engine which had more than 13 years of active development.
https://www.slikenet.com/
Other
401 stars 63 forks source link

GetNumberOfAddresses() return wrong value #55

Open ProfesoresPL opened 5 years ago

ProfesoresPL commented 5 years ago

I think it would be better, if I illustrate this, so ...

My code:

void CNetwork::info()
{
    uint16_t port = g_pServer->getConfig().getPort();
    uint32_t adresses = m_pPeer->GetNumberOfAddresses();

    printLog << dark_purple << "Listening on:\n" << none;
    for (uint32_t i = 0; i < adresses; ++i)
    {
        printLog << "- " << m_pPeer->GetLocalIP(i) << ":" << port << "\n";
    }

    printLog << "======================================================\n";
}

Output: problem