Example flask code to implement jsonrpc over websocket.