Java Netty WS 开启服务教程:https://www.yadinghao.com/article/details/202305060007.html
Autojs 代码
function testWSAddress(ws_address){
let ws = web.newWebSocket(ws_address);
let result_ws=""
ws.on("open", (res, ws) => {
log("WebSocket已连接");
result_ws= true;
}).on("failure", (err, res, ws) => {
log("WebSocket连接失败");
console.error(err);
result_ws= false;
})
sleep(3000)
return result_ws
}
console.show()
toastLog(testWSAddress(ws_address="ws://192.168.3.170:8686"))
连接成功示意图