import { ManagerOptions, SocketOptions } from 'socket.io-client'; import MessageService from '../base/message.js'; type EventHandler = (...arg: unknown[]) => void; /** * @class * Handles the socket connection * Also dispatch the action to handle data */ declare class SocketService extends MessageService { id: string; private readonly _defaultSocketOptions; /** @property _Socket Instance of the socket */ private readonly _socket; private readonly _url; /** * @constructor * @param url Socket connection url */ constructor(url: string, options?: Partial); /** * @method * Create a connection with socketIO */ connect(): void; /** * @method * Dispose the socket connection */ disconnect(): void; /** * @method * Handle the messages */ protected message(data: unknown, event?: string): void; /** * @method * listen message from socket */ protected listen(event: string, handler: EventHandler): void; /** * @method * return the socket id * @protected * @returns {string} */ protected getSocketId(): string; } export { type EventHandler, SocketService as default };