void SendMethodSubscribe(string methodName, WebSocketData.SubscribeParameter parameter)
 {
     WebSocketData.MethodSubscribe method = new WebSocketData.MethodSubscribe();
     method.method  = methodName;
     method.@params = parameter;
     Debug.Log("method" + JsonUtility.ToJson(method));
     ws.Send(JsonUtility.ToJson(method));
 }
 void Subscribe(string type, string cortexToken, string sessionId)
 {
     WebSocketData.SubscribeParameter p = new WebSocketData.SubscribeParameter();
     p.cortexToken = cortexToken;
     p.session     = sessionId;
     p.streams.Add(type);
     Debug.Log("subscribing");
     SendMethodSubscribe("subscribe", p);
 }