Adding functionality to support WebSocket based applications - this is far from complete