views:

190

answers:

1

Is there a way to reuse SSL socket connections on the iPhone. I'm seeing an extra 3-4 second overhead in doing SSL handshaking. I'm using NSURLconnection currently to do the API calls and each one of them is taking 4-5 seconds on Wifi. Any suggestions would be greatly appreciated.

A: 

Are you asking how to "reuse" sockets for the same specific address and port? Or for different URLs?

If the former, just don't close the socket until you're absolutely sure you don't need it anymore.

If the latter, there's nothing you can do about that. The SSL certificate verification process is likely where you're getting the overhead from.

You'll need to add more context to your question if you want a more specific answer.

Shaggy Frog