admin_startWS
描述:为节点启动 Websocket 服务
parameter
字段名称 | 数据类型 | 备注 |
---|---|---|
host | String | websocket 的主机名 |
port | Number | websocket 的端口号 |
allowedOrigins | String | 跨域资源共享 |
apis | String | 被允许的模块名称,以逗号分隔 |
return
数据类型 | 备注 |
---|---|
Boolean | 返回 true 时节点 Websocket 服务开启,否则返回错误的 code 和 message |
example
Request:
curl -X POST \
http://127.0.0.1:8283 \
-H 'Content-Type: application/json' \
-d '{"jsonrpc": "2.0", "id": 1, "method": "admin_startWS", "params": []}'
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}