####Linux inspection09 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i686 GNU/Linux
[23:28|% 100|+ 623|- 9]: Done
Notes: Head @ 5213c390, bare metal
DEST_OS: linux
#!/bin/bash | |
if [ "$1" != "" ]; then | |
echo " | |
---------------------------------------------------------------------------- | |
http://www.kernel.org/doc/Documentation/vm/ksm.txt : | |
The effectiveness of KSM and MADV_MERGEABLE is shown in /sys/kernel/mm/ksm/: |
self: 0x7f16b4000ba0 hdbc: 0x16cff40 stmt: (nil) | |
self: 0x16a9050 hdbc: 0x16b5d20 stmt: 0x2f00c208053e0f2f | |
self: 0x16a94f0 hdbc: 0x7f16b40011d0 stmt: 0x3f077ba918000000 | |
self: 0x7f16ac000d00 hdbc: 0x178c770 stmt: (nil) | |
self: 0x7f16ac000ba0 hdbc: 0x7f16b4047f90 stmt: (nil) | |
self: 0x16a76b0 hdbc: 0x16d13c0 stmt: 0x6c6975622f636264 | |
self: 0x7f16ac000e60 hdbc: 0x17f31c0 stmt: (nil) | |
self: 0x7f16ac001120 hdbc: 0x16e02d0 stmt: (nil) | |
self: 0x7f16ac000fc0 hdbc: 0x7f16ac0762e0 stmt: (nil) | |
self: 0x7f16ac001280 hdbc: 0x182f400 stmt: (nil) |
var dgram = require('dgram'); | |
var socket = dgram.createSocket('udp4'); | |
var testMessage = "[hello world] pid: " + process.pid; | |
var broadcastAddress = '255.255.255.255'; | |
var broadcastPort = 5555; | |
socket.setBroadcast(true); | |
socket.bind(broadcastPort, '0.0.0.0'); |
/* | |
* Copyright (c) 2011, Ben Noordhuis <[email protected]> | |
* | |
* Permission to use, copy, modify, and/or distribute this software for any | |
* purpose with or without fee is hereby granted, provided that the above | |
* copyright notice and this permission notice appear in all copies. | |
* | |
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
From 8ebf3363017dc223da153e69b372749ace222244 Mon Sep 17 00:00:00 2001 | |
From: Dan VerWeire <[email protected]> | |
Date: Thu, 27 Oct 2011 10:48:10 -0400 | |
Subject: [PATCH 1/2] Add support for uv_udp_set_broadcast | |
--- | |
deps/uv/include/uv.h | 12 ++++++++++++ | |
deps/uv/src/unix/udp.c | 16 ++++++++++++++++ | |
2 files changed, 28 insertions(+), 0 deletions(-) |
####Linux inspection09 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i686 GNU/Linux
[23:28|% 100|+ 623|- 9]: Done
Notes: Head @ 5213c390, bare metal
DEST_OS: linux
user@inspection09:/tmp$ uname -a
Linux inspection09 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i686 GNU/Linux
user@inspection09:/tmp$ netstat -plun
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
udp 0 0 0.0.0.0:12345 0.0.0.0:* 7853/udp-bind-twice
udp 0 0 0.0.0.0:12345 0.0.0.0:* 7776/udp-bind-twice
var http = require('http'), | |
fs = require('fs'), | |
cwd = process.cwd(); | |
http.createServer() | |
.on('request', function (request, response) { | |
var url = unescape(request.url); | |
var path = cwd + url; | |
console.log(request.socket.remoteAddress, path); |
=== debug test-c-ares === | |
Path: simple/test-c-ares | |
C:\node\test\simple\test-c-ares.js:46 | |
if (error) throw error; | |
^ | |
Error: getaddrinfo ENOENT | |
at errnoException (dns.js:31:11) | |
at Object.onanswer [as oncomplete] (dns.js:140:16) | |
Command: C:\node\Debug\node.exe C:\node\test\simple\test-c-ares.js | |
=== debug test-child-process-double-pipe === |
This page has Windows tools that can send and receive test multicast messages. With this tool, I have been able to run multiple instances of mcreceive.exe on the same machine. The both instances receive all messages sent by mcsend.exe.
This page has code which can be compiled on Linux (and other Unix?). Multiple instances can be run and they will not argue about listening on the same UDP port.