简体   繁体   中英

SSL and NIO Non-blocking Sockets

How do you recommend making a highly scalable SSL client?

Currently, I'm using plain Socket s to connect to the Apple APNS server which requires a non-HTTP SSL sockets. I considered using the NIO library, but it is lacking a SSLSocketChannel , and I couldn't find a good library or a smooth tutorial on how to roll out your own.

I would recommend you look at Mina SSLFilter,

http://mina.apache.org/report/trunk/apidocs/org/apache/mina/filter/ssl/SslFilter.html

If you don't want use Mina for some reason, you can also look at BouncyCastle JCE, whose SSL handler is easy to hook up with any stream,

http://www.bouncycastle.org/docs/docs1.6/org/bouncycastle/crypto/tls/TlsProtocolHandler.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM