public WebSocketCommunicateBehavior()
 {
     overlayAPI          = ACTWebSocketCore.overlayAPI;
     id                  = Guid.NewGuid().ToString();
     handle["broadcast"] = (session, o) => {
         String from    = id;
         JToken msg     = o["msg"].ToString();
         String msgtype = o["msgtype"].ToString();
         Broadcast(from, msgtype, msg);
     };
     handle["send"] = (session, o) => {
         String from    = id;
         JToken msg     = o["msg"].ToString();
         String msgtype = o["msgtype"].ToString();
         Broadcast(from, msgtype, msg);
     };
     handle["set_id"] = (session, o) => {
         String before = id;
         id = o["id"].ToString();
         String  to = id;
         JObject t  = new JObject();
         t["before"] = before;
         t["after"]  = to;
         Broadcast(id, "set_id", t);
     };
     overlayAPI.InstallMessageHandle(ref handle);
 }
Exemplo n.º 2
0
 public ACTWebSocketCore()
 {
     overlayAPI = new FFXIV_OverlayAPI(this);
 }
Exemplo n.º 3
0
 public ACTWebSocketCore(ACTWebSocketMain gui)
 {
     overlayAPI = new FFXIV_OverlayAPI(this);
     this.gui   = gui;
 }