On Wed, 7 Apr 2010, Shivanand wrote:
To extend the class for SSL transfer, I am thinking of initializing SSL
options in Connect method it self. This will result in setting of SSL
options again and again for each Connection. Is this a costly task (costly
in terms of socket handling and resource open/close) of setting the SSL
options or is it light weight thing?
Please let me know the issues that could be costly if I follow this method.
Setting the options is very cheap. As long as libcurl has a previous
connection already kept alive, it will allow re-use of it as long as your have
options set that are compatible.
If there are no connection to re-use, libcurl will use it's session-id cache
to speed up SSL reconnects.
Only if the two approaches above fails, libcurl will make a fresh new SSL
handshake - and that is relatively "expensive".
--
/ daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html