Hi,
I am developing a networked game using TNet. I works pretty nice, but now I have ran into a problem. I wanted to take my game outside of the LAN environment. This works fine with tcp but it doesn't work with udp packages.
Setup:
VPS running TNServer in mono.
Laptop on a home network running the game (one or multiple times)
Checks I did:
VPS is configured correctly, connecting to internet directly without router everything works fine.
Router configuration should be fine, this has been the same for ages and I have played all kind of games over internet of which some must use UDP. I didn't have to do any router configurations for those. So I guess it is a programmatical issue more than a configurational on the router side.
Client does send UDP packages that do arrive on the server.
Server only sends two UDP start package (which I guess is for the lobby)
After I had done a further code inspection it seems the server is denying udp packages because they are send from a different address than the address set on the player. Actually this is just another port, for example the UdpEndPoint for my client player is set to [externalip]:35138 and all message from the client come from [externalip]:59587 .
So my first guess to fix this would be to do the setting of the UdpEndPoint over udp instead of tcp, but I am not sure if this is the way to go or if there is a better solution to this problem.
I hope my description is clear, otherwise I would gladly clarify them.