Will this connect to the websocket at `ws://host/path/to/application/websocket` for arbitrary application paths? It looks like it may always connect to `ws://host/websocket` regardless of the application. This would only let one application and instance work at at time.

It probably needs to select `wss` in the `https` cases too.