capacitor-tcp-plugin
v0.1.11
Published
Tcp Socket that consist of both Server and Client implementation
Downloads
5
Maintainers
Readme
capacitor-tcp-plugin
Tcp Socket that consist of both Server and Client implementation
Install
npm install capacitor-tcp-plugin
npx cap sync
API
start()
start() => Promise<{ status: string; }>
Returns: Promise<{ status: string; }>
isConnectedToInternet()
isConnectedToInternet() => Promise<{ status: string; }>
Returns: Promise<{ status: string; }>
respondToClient(...)
respondToClient(options: { id: string; response: string; }) => Promise<{ status: string; }>
| Param | Type |
| ------------- | ---------------------------------------------- |
| options
| { id: string; response: string; } |
Returns: Promise<{ status: string; }>
sendMessageToServer(...)
sendMessageToServer(options: { ip: string; port: string; message: string; messageId: string; }) => Promise<{ status: string; }>
| Param | Type |
| ------------- | ------------------------------------------------------------------------------ |
| options
| { ip: string; port: string; message: string; messageId: string; } |
Returns: Promise<{ status: string; }>