0.0.1 • Published 12 months ago

capacitor-websocket v0.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
12 months ago

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>
ParamType
options{ url: string; socketConfig?: any; }

disconnect()

disconnect() => Promise<void>

on(...)

on(event: string, callback: (data: any) => void) => Promise<void>
ParamType
eventstring
callback(data: any) => void

emit(...)

emit(event: string, ...args: any[]) => Promise<void>
ParamType
eventstring
argsany[]

0.0.1

12 months ago