FAForever / java-ice-adapter

A P2P connection proxy for Supreme Commander: Forged Alliance using ICE
MIT License
5 stars 12 forks source link

Update ice4j to mainline and off custom fork #46

Closed Sheikah45 closed 10 months ago

Geosearchef commented 1 year ago

Have you seen this commit?

https://github.com/Geosearchef/ice4j/commit/52c8e4bcef5c3af9d299ffcdcc07b9e87bf8959a

Without that and some reflection hack in the adapter code (not sure if that breaks with a newer version), your relay connections will time out and die after 10 mins.

Sheikah45 commented 1 year ago

I played multiple full games beyond 10 minutes with the latest version

Sheikah45 commented 1 year ago

Also the lifetime is supposed to be explicitly set from the stun response as well. So using the value returned is proper. As this is the interval requested by the stun server

Geosearchef commented 1 year ago

If you didn't use a relay candidate, it doesn't matter that it worked for you, it won't work for others who need a relay candidate.

About the lifetime value, in theory that should be correct, in practice I can just tell you it didn't work back when I developed this and the turn server did not act according to documentation.

Do with that what you will, just saying, there's a reason I had to do this and you should test multiple games with multiple people with the new adapter before deploying any business logic changes to the adapter.

Sheikah45 commented 1 year ago

I had force relay on for some of the games as well. And yes I plan on testing

Geosearchef commented 1 year ago

I had force relay on for some of the games as well. And yes I plan on testing

Ok, then it's probably fine. Just providing some info from when this was developed, as there were a lot of quirks I had to work around.

(If I remember correctly, back in the day, the TURN server requested 10 mins, but timed out at 6, so I set it at 4 below 50%) But if it works now as intended, even better.

Sheikah45 commented 1 year ago

Understood. I appreciate the background as to why