Returns whether the connection negotiated the use of SSL or not.
bool uses_ssl() const;
This function can be used to determine whether you are using a SSL connection or not when using SSL negotiation.
This function always returns
if the underlying stream does not support SSL. This function always returns
false for connections that
haven't been established yet (handshake not run yet). If the handshake
fails, the return value is undefined.
Whether the connection is using SSL.