1

We are using PushSharp to send GCM (Google Android) Notifications. In the future we will also be using the IOS and WinPhone parts of the lib.

There are a few events like:

  • OnDeviceSubscriptionExpired
  • OnDeviceSubscriptionChanged
  • OnNotificationFailed

I have never seen these events triggered after quite some testing. I now suspect that the communication might be asynchronous, and that we might need some ports opened to the machine running the service that hosts PushSharp.

If that is the case, which ports should be forwarded and is there any way to configure or tweak the endpoints?

Eran
  • 387,369
  • 54
  • 702
  • 768
Louis Somers
  • 2,560
  • 3
  • 27
  • 57

1 Answers1

1

No inbound ports are required. GCM requires the normal HTTP or HTTPS outbound ports (for the HTTP GCM Connection Server. The GCM Cloud Connection Server is different, but I'm quite sure it doesn't require inbound ports either, and anyway, PushSharp is probably using the HTTP GCM Server). APNS requires outbound 2195 and 2196 ports.

The events you mentioned are probably triggered by PushSharp when it gets an error response from GCM or APNS (or, for APNS, when it gets device tokens from the Feedback Service). In GCM the communication is synchronous (assuming PushSharp uses the HTTP GCM Connection Server). In APNS the communication is asynchronous, but the error responses are read by the client (i.e. your 3rd party server) from the same socket used to send the messages, so the APNS server is not initiating any communication with your server.

Eran
  • 387,369
  • 54
  • 702
  • 768
  • So it can be, for example, when sending message #3 I can receive a response containing an error report about message #1 sent in an aerlier session/connection? – Louis Somers Nov 22 '13 at 16:19
  • 1
    @LouisSomers That's possible only for Apple Push Notifications. However, the error for the older message (#1) would originate from the same connection (since once a connection to APNS server is closed, you can't get error responses for messages that were sent through it). – Eran Nov 22 '13 at 16:33
  • 1
    @LouisSomers Actually that's possible for GCM Cloud Connection Server too, but I'm quite sure PushSharp is using the GCM HTTP Connection Server, in which you get the response immediately. – Eran Nov 22 '13 at 16:38