tcp command
path |
type |
conditions |
description |
tcpX.connect.port |
integer |
- required
- 0 ≤ value ≤ 65535
|
TCP port |
tcpX.connect.domain |
string |
|
Server Domain |
// Json Example
[
{
"tcp0": {
"connect": {
"port": 32767,
"domain": "obniz.io"
}
}
}
]
path |
type |
conditions |
description |
tcpX.disconnect |
boolean |
|
|
// Json Example
[
{
"tcp0": {
"disconnect": true
}
}
]
path |
type |
conditions |
description |
tcpX.write.data |
dataArray |
|
TCP data |
// Json Example
[
{
"tcp0": {
"write": {
"data": [16, 34, 242]
}
}
}
]
response: read
path |
type |
conditions |
description |
tcpX.read.data |
dataArray |
|
|
//Response Example
[
{
"tcp0": {
"read": {
"data": [16, 34, 242]
}
}
}
]
path |
type |
conditions |
description |
tcpX.connect.message |
string |
- required
- enum
"ok" "Port Used" "Port Area Error" "Lookup Error" "Error"
|
|
tcpX.connect.code |
number |
|
|
//Response Example
[
{
"tcp0": {
"connect": {
"message": "ok",
"code": 500
}
}
}
]
path |
type |
conditions |
description |
tcpX.connection.connected |
boolean |
|
|
//Response Example
[
{
"tcp0": {
"connection": {
"connected": true
}
}
}
]
type defines
type |
conditions |
examples |
description |
array |
|
[16, 34, 242] [100, 255, 21, 0, 21]
|
Binary data array. |