initial commit

This commit is contained in:
2023-09-10 20:38:49 -05:00
commit 7a1366303f
16 changed files with 3268 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
const dgram = require('dgram');
const { Decoder } = require('.');
const client = dgram.createSocket('udp4');
const psnDecoder = new Decoder();
client.on('listening', () => {
const address = client.address();
client.setBroadcast(true);
client.setMulticastTTL(128);
client.addMembership('236.10.10.10');
});
client.on('message', (message, remote) => {
psnDecoder.decode(message);
});
client.bind(56565, '0.0.0.0');