I did a disconnect and reconnect like this under Orbited 0.7 and STOMP by just creating an entirely new STOMPClient object and redoing my STOMPClient event handler setup and connect() call. I called the re-init code in the onerror and onclose handlers, so any protocol issue or explicit close call would cause a clean reconnect.
I seem to remember that the disconnect method didn't allow me to subsequently reconnect, forcing the new object solution, but it's been a while so I'm not sure on that. It also looks like the reset methods on STOMPClient and IRCClient (which call their TCPSocket instances' reset methods) might do what you need, but I can't remember if I tried that. (Again, all Orbited 0.7).
> I tried resetting the variables Orbited / the TCPSession and then
> creating a new instance of them (new TCPSession()) but with no luck,
> it just gives me "none callable" errors.
>
I was originally doing the window.location reload thing, but this turned out not to be necessary. I never had to mess with the window.TCPSocket or any of the other global Orbited objects.
The workaround was for an error with the TCPSocket on the server side (which I can't remember the details of, and no longer have the server side patch to fix), so it seems similar to your problem.
-Chris
--
Christopher Casebeer · http://chc.name
PGP 6a27 e753 b693 6309 f41a 8855 366f cff0 729b a0ee