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