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); } }
public virtual void Send(EndpointEntry ep, object obj) { }
public virtual void Register(EndpointEntry ep) { }
public static bool SendNotification(EndpointEntry target, object obj) { return SendNotification(target, Encoding.UTF8.GetBytes(obj.ToJson())); }
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); }