dtls_connect_peer method

int dtls_connect_peer(
  1. Pointer<dtls_context_t> ctx,
  2. Pointer<dtls_peer_t> peer
)

Establishes a DTLS channel with the specified remote peer. This function returns @c 0 if that channel already exists and a renegotiate was initiated, a value greater than zero when a new ClientHello message was sent, and a value less than zero on error.

@param ctx The DTLS context to use. @param peer The peer object that describes the session. @return A value less than zero on error, greater or equal otherwise.

Implementation

int dtls_connect_peer(
  ffi.Pointer<dtls_context_t> ctx,
  ffi.Pointer<dtls_peer_t> peer,
) {
  return _dtls_connect_peer(
    ctx,
    peer,
  );
}