pranavraja / apns Goto Github PK
View Code? Open in Web Editor NEWPush Notification client library in Go
License: ISC License
Push Notification client library in Go
License: ISC License
The Connect() function takes filesystem paths to the certificate and private key files. That's too limiting โ the server may not have filesystem storage available, or the private key may be considered too sensitive so it might be kept in a Keychain-like store or an LDAP server.
Probably the most flexible way to do this would be for Connect() to take a tls.Certificate as a parameter, and let the caller load the certificate by calling either LoadX509KeyPair or X509KeyPair, the latter of which takes the components as raw byte arrays.
(I just filed the exact same issue as huo-ju/Go-Apns#3. Apologies for copying and pasting the text, but the issue with both packages is identical.)
Unintuitively, calling apns.ReadInvalid
will return a non-nil error value if there are no invalid notifications, as the only way of determining whether there were no invalids is by allowing the socket read to timeout.
To resolve, either need to improve the documentation around this or add code to swallow the error in ReadInvalid
.
in your example, ApnsService connect to APNS and use it to send messages, but i can't find any code closing the connection.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.