Initial web socket API.

This PR is to a `websocket` feature branch for later merging into `master`.
I'm cool with that. It's as easy as adding an enum value in the public API too.