TooTallNate / Java-WebSocket

A barebones WebSocket client and server implementation written in 100% Java.
http://tootallnate.github.io/Java-WebSocket
MIT License
10.45k stars 2.57k forks source link

Change URI before reconnect #1431

Closed AlexChecker closed 2 months ago

AlexChecker commented 2 months ago

Describe what you would like to know or do I'm writing discord bot without JDA. So, my only way is to use websockets. But there is one thing, that I can't understand: can I change URI for my websocket client without re-initializing whole class? I can't check this myself, because situations, where I need to change URI are rare.

Additional context The way it's implemented in my code now: this.uri = new URI(resume_url); this.reconnect();

marci4 commented 2 months ago

The intention was not to adjust the URI. Just reinitialize the whole class.