In Socket.io, I know how to connect to a specific URL with io.connect("http://example.com/")
. However, it doesn't seem to work if I've already connected to a server.
Basically, I would like to change the server that I'm connected to (say, if the current one goes offline). So how would I do this? Would I need to disconnect first. If so, how?
Thanks!