Handle all websocket messages.