dc49af3c59
For now there are two methods: - `NETWORK:IsUrlAllowed()`: Check whether access to a certain URL is allowed. - `NETWORK:HttpRequest()`: Perform an HTTP request. By default access to the network is disabled for all target hosts. It can be enabled by setting `HttpEnable=1` in the preferences. Individual hosts have to be added to `HttpAllowHosts` as a comma separated list to allow access. See included docs for more details on usage.
12 lines
282 B
JavaScript
12 lines
282 B
JavaScript
const WebSocket = require('ws');
|
|
|
|
const wss = new WebSocket.Server({ port: 8080, perMessageDeflate: true });
|
|
|
|
wss.on('connection', function connection(ws) {
|
|
ws.on('message', function incoming(message) {
|
|
console.log('received: %s', message);
|
|
});
|
|
|
|
ws.send('something');
|
|
});
|