##### ssl::stream::handshake (2 of 4 overloads)

Perform SSL handshaking.

    void handshake(
        handshake_type type,
        asio::error_code & ec);

This function is used to perform SSL handshaking on the stream. The function call will block until handshaking is complete or an error occurs.

###### Parameters

type

  The type of handshaking to be performed, i.e. as a client or as a server.

ec

  Set to indicate what error occurred, if any.