Function nrfxlib_sys::nrf_connect[][src]

pub unsafe extern "C" fn nrf_connect(
    sock: c_int,
    p_servaddr: *const c_void,
    addrlen: nrf_socklen_t
) -> c_int

Function for connecting to an endpoint with a given address.

s The socket handle must be a valid handle that has not yet been connected. Running connect on a connected handle will return an error.

  • sock - The socket to use for connection.
  • p_servaddr - The address of the server to connect to.
  • addrlen - The size of the p_servaddr argument.

Returns 0 on success, or -1 on error.