Skip to main content

OH_WebSocketClient_Send

Function OH_WebSocketClient_Send 

Source
pub unsafe extern "C" fn OH_WebSocketClient_Send(
    client: *mut WebSocket,
    data: *mut c_char,
    length: usize,
) -> c_int
Available on crate feature api-11 only.
Expand description

Sends data from the client to the server.

§Arguments

  • client - Pointer to the websocket client.

  • data - Data sent by the client.

  • length - Length of the data sent by the client.

§Returns

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

Required System Capabilities: SystemCapability.Communication.NetStack

Available since API-level: 11

Version: 1.0