Skip to main content

OH_WebSocketClient_AddHeader

Function OH_WebSocketClient_AddHeader 

Source
pub unsafe extern "C" fn OH_WebSocketClient_AddHeader(
    client: *mut WebSocket,
    header: WebSocket_Header,
) -> c_int
Available on crate feature api-11 only.
Expand description

Adds the header information to the client request.

§Arguments

  • client - Pointer to the websocket client.

  • header - Header information

§Returns

  • 0 if success; non-0 otherwise. For details about error codes, see [OH_Websocket_ErrCode].

Required System Capabilities: SystemCapability.Communication.NetStack

Available since API-level: 11

Version: 1.0