The API for the websockets library is very similar to that of the
XHR/Translator library. The primary differences are that there is
always 1 open websocket connection which manages all communication
(unless another socket is explicitly opened) and *all* communication is
required to be asyncronous.
To enable websockets by default, add this to the top of your script: