0.0.1 • Published 12 months ago
capacitor-websocket v0.0.1
capacitor-websocket
Websocket support for capacitor without using capHttp
Install
npm install capacitor-websocket
npx cap sync
API
connect(...)
connect(options: { url: string; socketConfig?: any; }) => Promise<void>
Param | Type |
---|---|
options | { url: string; socketConfig?: any; } |
disconnect()
disconnect() => Promise<void>
on(...)
on(event: string, callback: (data: any) => void) => Promise<void>
Param | Type |
---|---|
event | string |
callback | (data: any) => void |
emit(...)
emit(event: string, ...args: any[]) => Promise<void>
Param | Type |
---|---|
event | string |
args | any[] |
0.0.1
12 months ago