I've switched my game to use udp instead of tcp, because you know
So I'm testing it over local network and I've faced some problems..
So if we would have a code
sf::UdpSocket socket;
sf::IpAddress SenderAddress;
sf::Packet ReceivedPacket;
unsigned short Port;
if(socket.receive(ReceivedPacket,SenderAddress,Port)==sf::Socket::Done) {
sf::IpAddress SenderLocalAddress = SenderAddress.getLocalAddress();
}
Now would the SenderLocalAddress be the sender's local address or the local host's local address?
Since when I send directly data from the client to server over local network the server receives the data, however when the server tries to response the client doesn't get the data.
And I was just wondering that does it even send it to the right IP?