pub unsafe extern "C" fn esp_transport_ws_send_raw(
    t: esp_transport_handle_t,
    opcode: ws_transport_opcodes_t,
    b: *const c_char,
    len: c_int,
    timeout_ms: c_int
) -> c_int
Expand description

@brief Sends websocket raw message with custom opcode and payload

Note that generic esp_transport_write for ws handle sends binary massages by default if size is > 0 and ping message if message size is set to 0. This API is provided to support explicit messages with arbitrary opcode, should it be PING, PONG or TEXT message with arbitrary data.

@param[in] t Websocket transport handle @param[in] opcode ws operation code @param[in] buffer The buffer @param[in] len The length @param[in] timeout_ms The timeout milliseconds (-1 indicates block forever)

@return

  • Number of bytes was written
  • (-1) if there are any errors, should check errno