Пример #1
0
 public override void Send(EndpointEntry target, object obj)
 {
     try
     {
         Current.Log.Add("GoogleDispatcher: SEND > " + target.endpoint);
         var ret = Helper.SendNotification(target, obj);
         Current.Log.Add("GoogleDispatcher: " + ret);
     }
     catch (Exception e) {
         Current.Log.Add(e);
     }
 }
Пример #2
0
 public virtual void Send(EndpointEntry ep, object obj)
 {
 }
Пример #3
0
 public virtual void Register(EndpointEntry ep)
 {
 }
Пример #4
0
 public static bool SendNotification(EndpointEntry target, object obj)
 {
     return SendNotification(target, Encoding.UTF8.GetBytes(obj.ToJson()));
 }
Пример #5
0
 public static bool SendNotification(EndpointEntry sub, byte[] data, int ttl = 0, ushort padding = 0,
     bool randomisePadding = false)
 {
     return SendNotification(sub.endpoint,
         data: data,
         userKey: Base64UrlDecode(sub.keys.p256dh),
         userSecret: Base64UrlDecode(sub.keys.auth),
         ttl: ttl,
         padding: padding,
         randomisePadding: randomisePadding);
 }