[−][src]Function libcoap_sys::coap_send_error
pub unsafe extern "C" fn coap_send_error(
session: *mut coap_session_t,
request: *mut coap_pdu_t,
code: c_uchar,
opts: *mut u16
) -> coap_tid_t
Sends an error response with code @p code for request @p request to @p dst. @p opts will be passed to coap_new_error_response() to copy marked options from the request. This function returns the transaction id if the message was sent, or @c COAP_INVALID_TID otherwise.
@param session The CoAP session. @param request The original request to respond to. @param code The response code. @param opts A filter that specifies the options to copy from the @p request.
@return The transaction id if the message was sent, or @c COAP_INVALID_TID otherwise.