Implemented core of websocket driven API.