views:

331

answers:

1

How do you recommend making a highly scalable SSL client?

Currently, I'm using plain Sockets 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.

+1  A: 

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

ZZ Coder