Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

libp2p-tcp

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libp2p-tcp - npm Package Compare versions

Comparing version 0.9.4 to 0.10.0

9

package.json
{
"name": "libp2p-tcp",
"version": "0.9.4",
"version": "0.10.0",
"description": "Node.js implementation of the TCP module that libp2p uses, which implements the interface-connection and interface-transport interfaces",

@@ -36,3 +36,3 @@ "main": "src/index.js",

"devDependencies": {
"aegir": "^11.0.0",
"aegir": "^11.0.1",
"chai": "^3.5.0",

@@ -50,4 +50,5 @@ "dirty-chai": "^1.2.2",

"lodash.isfunction": "^3.0.8",
"mafmt": "^2.1.6",
"multiaddr": "^2.2.2",
"mafmt": "^2.1.7",
"multiaddr": "^2.2.3",
"once": "^1.4.0",
"stream-to-pull-stream": "^1.7.2"

@@ -54,0 +55,0 @@ },

@@ -9,2 +9,3 @@ 'use strict'

const Connection = require('interface-connection').Connection
const once = require('once')
const debug = require('debug')

@@ -26,7 +27,7 @@ const log = debug('libp2p:tcp:dial')

cb = once(cb)
const cOpts = ma.toOptions()
log('Connecting to %s %s', cOpts.port, cOpts.host)
const rawSocket = net.connect(cOpts, cb)
const rawSocket = net.connect(cOpts)
rawSocket.once('timeout', () => {

@@ -37,2 +38,9 @@ log('timeout')

rawSocket.once('error', cb)
rawSocket.once('connect', () => {
rawSocket.removeListener('error', cb)
cb()
})
const socket = toPull.duplex(rawSocket)

@@ -39,0 +47,0 @@

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