pub unsafe extern "C" fn OH_WebSocketClient_Connect(
client: *mut WebSocket,
url: *const c_char,
options: WebSocket_RequestOptions,
) -> c_intAvailable on crate feature
api-11 only.Expand description
Connects the client to the server.
§Arguments
-
client- Pointer to the websocket client. -
url- URL for the client to connect to the server. -
options- Optional parameters.
§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