Ejemplo n.º 1
0
        public void SendEvent(string message, Dictionary <string, string> data)
        {
            string destination = "/app/challenge." + MatchId;
            Dictionary <string, object> apiParamData = new Dictionary <string, object> ();

            setApiParamData("message", message, ref apiParamData);
            setApiParamData("data", data, ref apiParamData);
            BacktorySender sender = GetSender(destination, apiParamData);

            sender.SendFast();
        }
Ejemplo n.º 2
0
        internal void SendDeliveryList(List <string> deliveryIdList)
        {
            string destination = "/app/chat/deliveryList";
            Dictionary <string, object> apiParamData = new Dictionary <string, object> ();

            setApiParamData("deliveryIdList", deliveryIdList, ref apiParamData);
            BacktorySender sender = GetSender(destination, apiParamData);

            // TODO threading
            sender.SendFast();
        }
Ejemplo n.º 3
0
        internal BacktoryResponse <T> SendAndReceive <T> (string destination, Dictionary <string, object> apiParamData, Type clazz) where T : class
        {
            BacktorySender sender = GetSender(destination, apiParamData);
            string         responseStr;

            try {
                responseStr = sender.Send();
            } catch (Exception) {
                return(BacktoryResponse <T> .Error(1000, "Not Connected"));
            }
            return(GenerateBacktoryResponse <T> (responseStr, clazz));
        }