WebSocket API
This folder contains the WebSocket API implementation for the Webitel UI SDK.
It includes configuration, client controller, and error event handling for WebSocket connections.
Use these modules to manage real-time communication in your application.
Configuration
The config.js file contains the default configuration settings for WebSocket connections.
These settings include:
- URL: The WebSocket server endpoint.
- Reconnection Policy: Rules for reconnecting after a connection is lost.
- Timeouts: Time intervals for connection attempts and message acknowledgments.
You can customize these settings to suit your application's requirements.
Modules
WebSocketClientController.ts: Manages the lifecycle of WebSocket connections, including opening, closing, and sending messages.websocketErrorEventHandler.ts: Handles WebSocket error events and provides mechanisms for logging or retrying connections.
Basic Usage
- Import
webSocketClientControllerinto your application and use asclient. - Call
client.getCliInstanse(). - If you need specific
creatCliInstancemethod for you case, pass it as a parameter intogetCliInstanse.
This implementation ensures reliable and efficient real-time communication for your application.