I am making a java game that includes multiplayer ,i want every player can host his own server in his computer and invite other players in,the problem here that 80% of players are behind routers so their routers drop the packets, the solution here is every player needs to manually port forward his router, which is a bad idea if the users are the average Joe and Jane.I am found many upnp port forwarding Java libraries over the web such as Cling, Weupnp and shabby-upnplib, I gave Cling a try, I added
" seamless-util-1.1.0" to the build path in Eclipse and this basic up ping pong code Server Class
Eclipse gives me this error :
The type org.teleal.cling.registry.DefaultRegistryListener cannot be resolved. It is indirectly referenced from required .class files
Other problems and questions in my mind : -does only the host player require port forwarding ? or the clients must do it to ?
-is my implementation for the port mapping are correct ?
-the game works perfectly under "localhost" (without port forwarding ) the clients and the server can talk to each other .
this is my first time working with UDP or network in general in java and i think am losing hope and deleting the multiplayer idea from my head