digiholic / osrs-archipelago

RuneLite plugin for integration with the Archipelago Randomizer
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Better visual feedback of connection status #7

Open digiholic opened 1 year ago

digiholic commented 1 year ago
KonoTyran commented 3 weeks ago

The library handles the ws:// wss:// for you, as long as you don't manually prefix your address with one.

KonoTyran commented 3 weeks ago

https://github.com/digiholic/osrs-archipelago/blob/44b990d4dcf077692911bd7f5d5c849ca2e357a6/src/main/java/gg/archipelago/APClient.java#L40 there is another method here public void connect(URI address, boolean allowDowngrade) which will automatically try to downgrade if the wss:// connection fails.

if you use public void connect(String address) instead then it will only allow downgrades if you dont prefix the address with ws:// or wss:// this is the one I recommend to use, as it will handle almost everything for you including default ports and whatnot