Skip to main content

OH_ArkWebHttpBodyStream_Read

Function OH_ArkWebHttpBodyStream_Read 

Source
pub unsafe extern "C" fn OH_ArkWebHttpBodyStream_Read(
    httpBodyStream: *const ArkWeb_HttpBodyStream,
    buffer: *mut u8,
    bufLen: c_int,
)
Available on crate features api-11 and api-12 only.
Expand description

Read the http body to the buffer.

The buffer must be larger than the bufLen. We will be reading data from a worker thread to the buffer,

so should not use the buffer in other threads before the callback to avoid concurrency issues.

ยงArguments

  • httpBodyStream - The ArkWeb_HttpBodyStream.

  • buffer - The buffer to receive data.

  • bufLen - The size of bytes to read.

Required System Capabilities: SystemCapability.Web.Webview.Core

Available since API-level: 12