rosie.ws_client: support multiple sources

And refactor.