mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-10 10:10:27 +08:00
完善API注释
This commit is contained in:
63
pkg/rpc/jsons/tcp_protocol.md
Normal file
63
pkg/rpc/jsons/tcp_protocol.md
Normal file
@@ -0,0 +1,63 @@
|
||||
# TCP协议配置
|
||||
|
||||
## 定义
|
||||
~~~json
|
||||
{
|
||||
"isOn": "是否启用",
|
||||
"listen": [
|
||||
{
|
||||
"protocol": "协议",
|
||||
"host": "主机地址,通常为空",
|
||||
"portRange": "端口或者端口范围"
|
||||
},
|
||||
...
|
||||
]
|
||||
}
|
||||
~~~
|
||||
|
||||
## 示例
|
||||
|
||||
### 监听1234端口
|
||||
~~~json
|
||||
{
|
||||
"isOn": true,
|
||||
"listen": [
|
||||
{
|
||||
"protocol": "tcp",
|
||||
"host": "",
|
||||
"portRange": "1234"
|
||||
}
|
||||
]
|
||||
}
|
||||
~~~
|
||||
|
||||
### 监听1234和2345端口
|
||||
~~~json
|
||||
{
|
||||
"isOn": true,
|
||||
"listen": [
|
||||
{
|
||||
"protocol": "tcp",
|
||||
"portRange": "1234"
|
||||
},
|
||||
{
|
||||
"protocol": "tcp",
|
||||
"portRange": "2345"
|
||||
}
|
||||
]
|
||||
}
|
||||
~~~
|
||||
|
||||
### 监听1234到1240之间的所有端口
|
||||
~~~json
|
||||
{
|
||||
"isOn": true,
|
||||
"listen": [
|
||||
{
|
||||
"protocol": "tcp",
|
||||
"host": "",
|
||||
"portRange": "1234-1240"
|
||||
}
|
||||
]
|
||||
}
|
||||
~~~
|
||||
Reference in New Issue
Block a user