0.0.2 • Published 2 years ago

capacitor-tcp-client v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

capacitor-tcp-client

send and receive data

Install

npm install capacitor-tcp-client
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>
ParamType
options{ value: string; }

Returns: Promise<{ value: string; }>


connect(...)

connect(options: { ipAddress: string; port: number; }) => Promise<{ success: boolean; client: number; }>
ParamType
options{ ipAddress: string; port: number; }

Returns: Promise<{ success: boolean; client: number; }>


disconnect(...)

disconnect(options: { client: number; }) => Promise<{ success: boolean; client: number; }>
ParamType
options{ client: number; }

Returns: Promise<{ success: boolean; client: number; }>


send(...)

send(options: { data: string; client: number; }) => Promise<{ result: any; }>
ParamType
options{ data: string; client: number; }

Returns: Promise<{ result: any; }>


sendRaw(...)

sendRaw(options: { data: string; client: number; }) => Promise<{ result: any; }>
ParamType
options{ data: string; client: number; }

Returns: Promise<{ result: any; }>


onData(...)

onData(options: { client: number; }) => Promise<{ result: any; }>
ParamType
options{ client: number; }

Returns: Promise<{ result: any; }>