pub fn connect(&mut self) -> Result<()> {
        unsafe {
            let status = secure_session_connect(self.session_ctx);
            let error = Error::from_session_status(status);
            if error.kind() != ErrorKind::Success {
                return Err(error);
            }
        }
        Ok(())
    }
/// Initiates connection to the remote peer.
///
/// This is the first method to call. It uses transport callbacks to send the resulting
/// connection request to the peer. Afterwards call [`negotiate_transport`] until the
/// connection is established. That is, until the [`state_changed`] callback of your
/// `SecureSessionTransport` tells you that the connection is `Established`, or until
/// [`is_established`] on this Secure Session returns `true`.
///
/// This method is a part of transport API and requires [`send_data`] method of
/// `SecureSessionTransport`.
///
/// [`negotiate_transport`]: struct.SecureSession.html#method.negotiate_transport
/// [`state_changed`]: trait.SecureSessionTransport.html#method.state_changed
/// [`is_established`]: struct.SecureSession.html#method.is_established
/// [`send_data`]: trait.SecureSessionTransport.html#method.send_data
Initiates connection to the remote peer.
This is the first method to call. It uses transport callbacks to send the resulting
connection request to the peer. Afterwards call [`negotiate_transport`] until the
connection is established.

This method is a part of transport API and requires [`send_data`] method of
`SecureSessionTransport`.


Initiates connection to the remote peer . This is the first method to call . It uses transport callbacks to send the resulting connection request to the peer . Afterwards call [ ` negotiate_transport ` ] until the connection is established . This method is a part of transport API and requires [ ` send_data ` ] method of ` SecureSessionTransport ` .
pub fn connect(&mut self) -> Result<()> {
        unsafe {
            let status = secure_session_connect(self.session_ctx);
            let error = Error::from_session_status(status);
            if error.kind() != ErrorKind::Success {
                return Err(error);
            }
        }
        Ok(())
    }
pub fn connect ( & mut self ) -> Result < ( ) > { unsafe { let status = secure_session_connect ( self . session_ctx ) ; let error = Error :: from_session_status ( status ) ; if error . kind ( ) != ErrorKind :: Success { return Err ( error ) ; } } Ok ( ( ) ) }
Initiates connection to the remote peer.
Initiates connection to the remote peer .
&mut self
&mut self