Function riot_sys::gnrc_tcp_listen

source ·
pub unsafe extern "C" fn gnrc_tcp_listen(
    queue: *mut gnrc_tcp_tcb_queue_t,
    tcbs: *mut gnrc_tcp_tcb_t,
    tcbs_len: size_t,
    local: *const gnrc_tcp_ep_t
) -> c_int
Expand description

@brief Configures a sequence of TCBs to wait for incoming connections.

@pre All TCBs behind @p tcbs must have been initialized via gnrc_tcp_tcb_init(). @pre @p queue must not be NULL. @pre @p tcbs must not be NULL. @pre @p tcbs_len must be greater 0. @pre @p local len must be NULL. @pre @p local->port must not be 0.

@param[in,out] queue Listening queue for incoming connections. @param[in] tcbs TCBs associated with @p queue. @param[in] tcbs_len Number of TCBs behind @p tcbs. @param[in] local Endpoint specifying address and port to listen on.

@returns 0 on success. @return -EAFNOSUPPORT given address family in @p local is not supported. @return -EINVAL address_family in @p tcbs and @p local do not match. @return -EISCONN a TCB in @p tcbs is already connected. @return -ENOMEM all available receive buffers are in use. Increase GNRC_TCP_RCV_BUFFERS.