Type Alias esp_idf_sys::httpd_ws_frame_t

source ·
pub type httpd_ws_frame_t = httpd_ws_frame;
Expand description

@brief WebSocket frame format

Aliased Type§

struct httpd_ws_frame_t {
    pub final_: bool,
    pub fragmented: bool,
    pub type_: u32,
    pub payload: *mut u8,
    pub len: usize,
}

Fields§

§final_: bool

< Final frame: For received frames this field indicates whether the FIN flag was set. For frames to be transmitted, this field is only used if the fragmented option is set as well. If fragmented is false, the FIN flag is set by default, marking the ws_frame as a complete/unfragmented message (esp_http_server doesn’t automatically fragment messages)

§fragmented: bool

< Indication that the frame allocated for transmission is a message fragment, so the FIN flag is set manually according to the final option. This flag is never set for received messages

§type_: u32

< WebSocket frame type

§payload: *mut u8

< Pre-allocated data buffer

§len: usize

< Length of the WebSocket data