mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
9 lines
299 B
JavaScript
9 lines
299 B
JavaScript
// Phase 21 — `ws` WebSocket benign control.
|
|
const _NYX_ADAPTER_MARKER = "require('ws')";
|
|
const _NYX_WS_MESSAGE_MARKER = "wss.on('connection', ws => ws.on('message', onMessage))";
|
|
|
|
function onMessage(data) {
|
|
return 'echoed: ' + JSON.stringify(String(data));
|
|
}
|
|
|
|
module.exports = { onMessage };
|