Comparing version 0.1.2 to 1.0.0
@@ -0,0 +0,0 @@ // OMG OSC, a Plask / NodeJS OSC implementation. |
@@ -0,0 +0,0 @@ // OMG OSC, a Plask / NodeJS OSC implementation. |
@@ -22,3 +22,3 @@ // OMG OSC, a Plask / NodeJS OSC implementation. | ||
var sys = require('util'); | ||
var util = require('util'); | ||
var events = require('events'); | ||
@@ -31,3 +31,2 @@ var dgram = require('dgram'); | ||
var udp = dgram.createSocket('udp4'); | ||
udp.bind(); | ||
if (opts.broadcast === true) | ||
@@ -129,4 +128,10 @@ udp.setBroadcast(true); | ||
this.close = function () { | ||
udp.close() | ||
// Close the underlying socket for the sender. Since this is UDP this | ||
// doesn't really have an effect beyond just closing the file descriptor. | ||
// Returns true if the socket was closed or false if it was already closed. | ||
this.close = function() { | ||
if (udp === null) return false; // Already closed. | ||
udp.close(); | ||
udp = null; // Any further use (send, etc) should cause an exception. | ||
return true; | ||
}; | ||
@@ -260,10 +265,16 @@ } | ||
this.close = function () { | ||
udp.close() | ||
this_.removeAllListeners() | ||
} | ||
// Close the underlying socket for the receiver. No new messages should be | ||
// received and the socket will be closed (although perhaps it is possible | ||
// we will still get some messages that are already received and buffered). | ||
// Returns true if the socket was closed or false if it was already closed. | ||
this.close = function() { | ||
if (udp === null) return false; | ||
udp.close(); | ||
udp = null; | ||
return true; | ||
}; | ||
} | ||
sys.inherits(UdpReceiver, events.EventEmitter); | ||
util.inherits(UdpReceiver, events.EventEmitter); | ||
exports.UdpSender = UdpSender; | ||
exports.UdpReceiver = UdpReceiver; |
{ | ||
"name": "omgosc", | ||
"version": "1.0.0", | ||
"author": "Dean McNamee <dean@gmail.com>", | ||
"name": "omgosc", | ||
"version": "0.1.2", | ||
"keywords": ["osc", "open sound control"], | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/oierbravo/omgosc.git" | ||
"url": "https://github.com/deanm/omgosc" | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Dean McNamee", | ||
"email": "dean@gmail.com" | ||
}, | ||
{ | ||
"name": "pizthewiz", | ||
"email": "" | ||
}, | ||
{ | ||
"name": "Oier Bravo Urtasun", | ||
"email": "https://github.com/oierbravo" | ||
}, | ||
{ | ||
"name": "karlosgliberal", | ||
"email": "https://github.com/karlosgliberal" | ||
}, | ||
{ | ||
"name": "brainrape", | ||
"email": "https://github.com/brainrape" | ||
} | ||
], | ||
"main": "./omgosc" | ||
"main": "omgosc.js" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
295
1
11927
3