timehop / apns

A Go package to interface with the Apple Push Notification Service
https://godoc.org/github.com/timehop/apns
MIT License
185 stars 47 forks source link

TCP Keepalive option #63

Closed zaninime closed 4 years ago

zaninime commented 8 years ago

It would be useful to have the possibility of setting some socket options from the application while initializing a Client. For example I had to deploy a low-traffic notification gateway on Google Cloud Platform. All the instances have a private IP, NATed on a public one. The NAT timeouts after 10 mins of TCP inactivity. I forked your repo, please see what I mean here: https://github.com/zaninime/apns/commit/5f8cba15b3ff10b0930d6009d4651b7a48d57575

zaninime commented 8 years ago

conn could be nil in some cases, so I added some simple type checking. https://github.com/zaninime/apns/commit/ea689b0748b5ebd72bb33e2424614a6bd8d6dd31

nathany commented 8 years ago

hm. I wonder if it would be possible to use a custom Client that is configured the way you want it.

thecraftman commented 5 years ago

Try implementing on linux