Reputation: 35
So I have a java udp server that's meant to be able to use a middle man program on a public server to hole punch to it's clients so it can be run from anywhere. The middle man works, the hole punching works, but not together.
Whenever I connect a client to the server, the thread with the connection to the middle man crashes with "connected address and packet address differ".
Without overhauling the middle man's code, I need to keep the one socket and port. How can I get this system to work without throwing the illegal argument error?
Upvotes: 0
Views: 577
Reputation: 310860
Don't use connect()
. It isn't usually necessary, and it conflicts with your use-case.
Upvotes: 2