Launch Week Day 5: Introducing Reachability for PHP.Learn More
Socket
Book a DemoSign in
Socket

ain2

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ain2 - npm Package Compare versions

Comparing version
1.5.1
to
1.5.2
+16
dgram_test.js
//One-shot server. Note that the server cannot send a reply;
//UNIX datagram sockets are unconnected and the client is not addressable.
var unix = require('unix-dgram');
var server = unix.createSocket('unix_dgram', function(buf) {
console.log('received ' + buf);
server.close();
});
server.bind('/tmp/ain_test_socket.sock');
//Send a single message to the server.
var message = Buffer('ping');
var client = unix.createSocket('unix_dgram');
client.on('error', console.error);
client.send(message, 0, message.length, '/tmp/ain_test_socket.sock');
client.close();
+7
-2
language: node_js
node_js:
- "0.10"
- "0.8"
- "0.12"
- "0.11"
- "0.10"
- "0.8"
- "0.6"
- "iojs"
- "iojs-v1.0.4"
# CHANGELOG
## v1.5.2
* Fix socket bind problem in combination with cluster.js for node verions > v0.10.x (Issue #33)
* Have travis test more node versions
## v1.5.1

@@ -4,0 +9,0 @@

@@ -12,2 +12,13 @@ var dgram = require('dgram');

var releaseTimeout
// HACK: On Node v0.11.x and v0.12.x bind the socket to ensure that it works when clustering
// This should be a temporary fix until node fixes the cluster module
var socketBindRequired = (function(){
if(/^v0\.([0-9]|10)\..*$/.test(process.version)) {
return false;
}
else {
return true;
}
})();
var socketErrorHandler = function (err) {

@@ -46,5 +57,3 @@

// HACK: On Node v0.11.x bind the socket to ensure that it works when clustering
// THis should be a temporary fix until node fixes the cluster module
if (/^v0\.11\..*$/.test(process.version)) {
if (socketBindRequired && type == 'udp4') {
socket.bind({

@@ -51,0 +60,0 @@ port: 0,

{
"name": "ain2",
"description": "Syslog logging for node.js. Continuation of ain",
"version": "1.5.1",
"version": "1.5.2",
"main": "./index",

@@ -6,0 +6,0 @@ "author": "Alexander Dorofeev <aka.spin@gmail.com>",