Function ucp_ep_create

Source
pub unsafe extern "C" fn ucp_ep_create(
    worker: ucp_worker_h,
    params: *const ucp_ep_params_t,
    ep_p: *mut ucp_ep_h,
) -> ucs_status_t
Expand description

@ingroup UCP_ENDPOINT @brief Create and connect an endpoint.

This routine creates and connects an @ref ucp_ep_h “endpoint” on a @ref ucp_worker_h “local worker” for a destination @ref ucp_address_t “address” that identifies the remote @ref ucp_worker_h “worker”. This function is non-blocking, and communications may begin immediately after it returns. If the connection process is not completed, communications may be delayed. The created @ref ucp_ep_h “endpoint” is associated with one and only one @ref ucp_worker_h “worker”.

@param [in] worker Handle to the worker; the endpoint is associated with the worker. @param [in] params User defined @ref ucp_ep_params_t configurations for the @ref ucp_ep_h “UCP endpoint”. @param [out] ep_p A handle to the created endpoint.

@return Error code as defined by @ref ucs_status_t

@note One of the following fields has to be specified:

  • ucp_ep_params_t::address
  • ucp_ep_params_t::sockaddr
  • ucp_ep_params_t::conn_request

@note By default, ucp_ep_create() will connect an endpoint to itself if the endpoint is destined to the same @a worker on which it was created, i.e. @a params.address belongs to @a worker. This behavior can be changed by passing the @ref UCP_EP_PARAMS_FLAGS_NO_LOOPBACK flag in @a params.flags. In that case, the endpoint will be connected to the next endpoint created in the same way on the same @a worker.