onConnecting
Feature Introduction
info
When a WebSocket connection is being established, this callback is triggered.
- iOS
- Android
- Flutter
- uni-app
- Browser/Electron/MiniProgram
- Unity
Return Prototype
Function()? onConnecting;
Return Prototype
- (void)onConnecting;
Return Prototype
onConnecting(data: WSEvent): void;
Call Example
import { getSDK, CbEvents } from '@openim/wasm-client-sdk';
// or
// import { OpenIMSDK, CbEvents } from 'open-im-sdk';
// const IMSDK = new OpenIMSDK();
const IMSDK = getSDK();
IMSDK.on(CbEvents.OnConnecting, () => {});
Return Results
Name | Type | Description |
---|---|---|
data | WSEvent | - |
Return Prototype
onConnecting(data: WSEvent): void;
Return Results
Name | Type | Description |
---|---|---|
data | WSEvent | - |
Call Example
import IMSDK from 'openim-uniapp-polyfill';
IMSDK.subscribe(IMSDK.IMEvents.OnConnecting, () => {});
Prototype
void OnConnecting();