We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
但是本地使用nodejszhi xing执行是正常的, whistle中脚本是这样的 `const protobuf = require("/usr/local/lib/node_modules/protobufjs"); const lz4 = require('/usr/local/lib/node_modules/lz4');
exports.handleWebSocket = async (ws,connect) => { const res = await connect(); ws.on('message', (data) => { res.send(data) console.log('client send'); }); res.on('message', (data) => {
ws.send(data) }); ws.on('error', (err) => { console.error('Client Error:', err); }); ws.on('close', (code, reason) => { console.log('Client Closed:', { code, reason }); }); res.on('error', (err) => { console.error('Server Error:', err); }); res.on('close', (code, reason) => { console.log('Server Closed:', { code, reason }); }); ws.on("ping", function heartbeat() { console.log('444') ws.pong(); })
};`
The text was updated successfully, but these errors were encountered:
whistle.script 用 vm 执行代码,可能 vm 不支持运行这个模块,你自己写个插件试试
Sorry, something went wrong.
小白一个,再请教下是写一个类似script得这个插件吗?
不需要像 script 那么通用,按自己业务需要写一个简单的即可
No branches or pull requests
但是本地使用nodejszhi xing执行是正常的,
whistle中脚本是这样的
`const protobuf = require("/usr/local/lib/node_modules/protobufjs");
const lz4 = require('/usr/local/lib/node_modules/lz4');
exports.handleWebSocket = async (ws,connect) => {
const res = await connect();
ws.on('message', (data) => {
res.send(data)
console.log('client send');
});
res.on('message', (data) => {
};`
The text was updated successfully, but these errors were encountered: