I'm sending data to remote server, but packages are not reach the
destination. Wireshark shows that packages were sent. With receiving data
no problems. I'm sure it's not a problem with network/firewall etc. Node.js
v10.16.3, OS: macOS Catalina 10.15.2. Also tested with Node.js 12.16.1 and
on Windows 10
const dgram = require("dgram");
const server = dgram.createSocket("udp4");
const message = Buffer.from("test");
server.on('error', function (error) {
console.log('Error: ' + error);
server.close();
});
server.on('close', function () {
console.log("closed");
});
server.on("listening", () => {
server.send(message, 0, message.length, destinationPort, destinationHost);
});
server.on('message', function (msg, info) {
console.log(msg.toString());
console.log(info);
});
server.bind(localPort);
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/ebc71eaf-a053-4570-b413-9bdba244313c%40googlegroups.com.