New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dgram-stream

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dgram-stream - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

12

example.js

@@ -6,4 +6,4 @@

// setup the receiver
var listenSock = dgram.createSocket('udp4')
var listenStream = ds(listenSock);
var listenSocket = dgram.createSocket('udp4')
var listenStream = ds(listenSocket);

@@ -19,9 +19,9 @@ listenStream.on('data', function(item) {

// bind on the socket or stream works
listenStream.bind(1234)
listenSock.bind(1234)
// setup the sender
var sendSock = dgram.createSocket('udp4')
var sendStream = ds(sendSock)
var sendSocket = dgram.createSocket('udp4')
var sendStream = ds(sendSocket)

@@ -28,0 +28,0 @@ // send!

@@ -78,2 +78,6 @@ var inherits = require('inherits');

DgramStream.prototype.bind = function() {
return this.sock.bind.apply(this.sock, arguments);
}
function splitAddr(addr) {

@@ -80,0 +84,0 @@ var i = addr.lastIndexOf(':');

{
"name": "dgram-stream",
"version": "0.1.1",
"version": "0.1.2",
"description": "udp messages as a stream of objects",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -24,3 +24,3 @@ # dgram-stream - udp as a duplex stream

```json
```js
{ from: { address: '127.0.0.1', family: 'IPv4', port: 55230, size: 11 },

@@ -37,4 +37,4 @@ payload: <Buffer 6d 79 20 64 61 74 61> }

// setup the receiver
var listenSock = dgram.createSocket('udp4')
var listenStream = ds(listenSock);
var listenSocket = dgram.createSocket('udp4')
var listenStream = ds(listenSocket);

@@ -46,8 +46,8 @@ listenStream.on('data', function(item) {

listenSock.bind(1234)
listenSocket.bind(1234)
// setup the sender
var sendSock = dgram.createSocket('udp4')
var sendStream = ds(sendSock)
var sendSocket = dgram.createSocket('udp4')
var sendStream = ds(sendSocket)

@@ -54,0 +54,0 @@ // send!

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc