After setting up a server running RakNet, I run the following code:
peer->GetSockets(sockets);
for (auto i = 0; i < sockets.Size(); ++i)
LOG(INFO) << "Bound to address " << peer->GetMyBoundAddress(i).ToString();
The output is the following (I set up one port for IPv4 and one port for IPv6):
2016-06-21 20:11:07,450 INFO Bound to address 127.0.0.1|1111
2016-06-21 20:11:07,460 INFO Bound to address ::1|1112
What I find incredibly strange is that RakNet has bound to the loopback address. However, the server seems to work and does accept connections. My two questions are:
- Why is RakNet binding to the loopback instead of the ethernet addresses?
- How does anything even get through to the server? Since it's bound to the loopback address, wouldn't it only receive packets generated on the same machine?
After setting up a server running RakNet, I run the following code:
The output is the following (I set up one port for IPv4 and one port for IPv6):
What I find incredibly strange is that RakNet has bound to the loopback address. However, the server seems to work and does accept connections. My two questions are: