Go to file
2024-10-28 15:01:11 -04:00
android send connecting on android 2024-10-28 15:01:11 -04:00
example-app Initial commit 2024-10-03 01:03:39 -04:00
ios fix ios issue 2024-10-05 13:05:11 -04:00
src i broke it :) 2024-10-03 14:42:36 -04:00
.eslintignore Initial commit 2024-10-03 01:03:39 -04:00
.gitignore Initial commit 2024-10-03 01:03:39 -04:00
.prettierignore Initial commit 2024-10-03 01:03:39 -04:00
CapacitorSockets.podspec Initial commit 2024-10-03 01:03:39 -04:00
CONTRIBUTING.md Initial commit 2024-10-03 01:03:39 -04:00
package-lock.json getting there 2024-10-03 13:45:22 -04:00
package.json getting there 2024-10-03 13:45:22 -04:00
Package.swift Initial commit 2024-10-03 01:03:39 -04:00
README.md i broke it :) 2024-10-03 14:42:36 -04:00
rollup.config.js getting there 2024-10-03 13:45:22 -04:00
tsconfig.json Initial commit 2024-10-03 01:03:39 -04:00

capacitor-sockets

Sockets

Install

npm install capacitor-sockets
npx cap sync

API

create(...)

create(options: { id: string; }) => Promise<void>
Param Type
options { id: string; }

connect(...)

connect(options: { id: string; host: string; port: number; useTLS?: boolean; acceptInvalidCertificates?: boolean; }) => Promise<void>
Param Type
options { id: string; host: string; port: number; useTLS?: boolean; acceptInvalidCertificates?: boolean; }

send(...)

send(options: { id: string; message: string; }) => Promise<void>
Param Type
options { id: string; message: string; }

disconnect(...)

disconnect(options: { id: string; }) => Promise<void>
Param Type
options { id: string; }

close(...)

close(options: { id: string; }) => Promise<void>
Param Type
options { id: string; }

addListener('state', ...)

addListener(eventName: "state", listenerFunc: (message: { id: string; state: string; }) => void) => Promise<PluginListenerHandle>
Param Type
eventName 'state'
listenerFunc (message: { id: string; state: string; }) => void

Returns: Promise<PluginListenerHandle>


addListener('message', ...)

addListener(eventName: "message", listenerFunc: (message: { id: string; message: string; }) => void) => Promise<PluginListenerHandle>
Param Type
eventName 'message'
listenerFunc (message: { id: string; message: string; }) => void

Returns: Promise<PluginListenerHandle>


Interfaces

PluginListenerHandle

Prop Type
remove () => Promise<void>