A TCP Socket Plugin for capacitor
Thanks @ottimis
npm install capacitor-tcp-socket
npx cap sync
connect(options: ConnectOptions) => Promise<ConnectResult>
Param | Type |
---|---|
options |
ConnectOptions |
Returns: Promise<ConnectResult>
send(options: SendOptions) => Promise<void>
Param | Type |
---|---|
options |
SendOptions |
read(options: ReadOptions) => Promise<ReadResult>
Param | Type |
---|---|
options |
ReadOptions |
Returns: Promise<ReadResult>
disconnect(options: DisconnectOptions) => Promise<DisconnectResult>
Param | Type |
---|---|
options |
DisconnectOptions |
Returns: Promise<DisconnectResult>
Prop | Type |
---|---|
client |
number |
Prop | Type |
---|---|
ipAddress |
string |
port |
number |
Prop | Type |
---|---|
client |
number |
data |
string |
Prop | Type |
---|---|
result |
string |
Prop | Type | Description |
---|---|---|
client |
number |
|
expectLen |
number |
|
timeout |
number |
timeout in seconds. default: 10 only ios supports timeout. |
Prop | Type |
---|---|
client |
number |
Prop | Type |
---|---|
client |
number |