Skip to content
Snippets Groups Projects

WIP: Old 4

Merged arshiam2 requested to merge old-4 into master
Compare and
23 files
+ 442
528
Compare changes
  • Side-by-side
  • Inline
Files
23
@@ -4,14 +4,14 @@ const chalk = require("chalk");
const handleErrors = require("../utils/handleErrors");
module.exports.command = "whoami";
module.exports.command = "init";
module.exports.describe = "test commands";
module.exports.builder = (yargs: any) => yargs;
const PORT = 20000;
const MULTICAST_ADDR = "233.255.255.255";
const HOST = "172.22.158.15";
const HOST = "172.22.156.15";
const dgram = require("dgram");
const process = require("process");
@@ -21,7 +21,7 @@ const socket = dgram.createSocket({ type: "udp4", reuseAddr: true });
socket.bind(PORT);
function sendMessage() {
const message = Buffer.from(`cli ${process.pid}`);
const message = Buffer.from(`init`);
socket.send(message, 0, message.length, PORT, HOST, function() {});
}
Loading