small wrapper around websocket that does message buffering and reconnects