该研报主要内容包括:
系统通过HTTP服务器提供两个API接口:/admin 和 /status。
/admin
/status
/admin 接口允许用户发送控制消息,格式如下:
Host
localhost:8080
count
target
示例请求:
POST /admin Host: localhost:8080 count: 5 target: example_target
/status 接口用于检查系统状态,返回值为 ACTIVE 或 INACTIVE。
ACTIVE
INACTIVE
系统内部逻辑:
channel
admin
controlChannel
doStuff
statusPollChannel
系统监听端口 1337 上的 HTTP 请求。
1337