#[repr(C)]pub struct ucp_listener_params {
pub field_mask: u64,
pub sockaddr: ucs_sock_addr_t,
pub accept_handler: ucp_listener_accept_handler_t,
pub conn_handler: ucp_listener_conn_handler_t,
}Expand description
@ingroup UCP_WORKER @brief Parameters for a UCP listener object.
This structure defines parameters for @ref ucp_listener_create, which is used to listen for incoming client/server connections.
Fields§
§field_mask: u64Mask of valid fields in this structure, using bits from @ref ucp_listener_params_field. Fields not specified in this mask will be ignored. Provides ABI compatibility with respect to adding new fields.
sockaddr: ucs_sock_addr_tAn address in the form of a sockaddr. This field is mandatory for filling (along with its corresponding bit in the field_mask - @ref UCP_LISTENER_PARAM_FIELD_SOCK_ADDR). The @ref ucp_listener_create routine will return with an error if sockaddr is not specified.
accept_handler: ucp_listener_accept_handler_tHandler to endpoint creation in a client-server connection flow. In order for the callback inside this handler to be invoked, the UCP_LISTENER_PARAM_FIELD_ACCEPT_HANDLER needs to be set in the field_mask.
conn_handler: ucp_listener_conn_handler_tHandler of an incoming connection request in a client-server connection flow. In order for the callback inside this handler to be invoked, the @ref UCP_LISTENER_PARAM_FIELD_CONN_HANDLER needs to be set in the field_mask. @note User is expected to call ucp_ep_create with set @ref UCP_EP_PARAM_FIELD_CONN_REQUEST flag to @ref ucp_ep_params_t::field_mask and @ref ucp_ep_params_t::conn_request in order to be able to receive communications.
Trait Implementations§
Source§impl Clone for ucp_listener_params
impl Clone for ucp_listener_params
Source§fn clone(&self) -> ucp_listener_params
fn clone(&self) -> ucp_listener_params
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more