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

@libp2p/tcp

Package Overview
Dependencies
Maintainers
6
Versions
587
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libp2p/tcp

A TCP transport for libp2p

  • 10.0.13
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.6K
decreased by-28.65%
Maintainers
6
Weekly downloads
 
Created
Source

@libp2p/tcp

libp2p.io Discuss codecov CI

A TCP transport for libp2p

About

A libp2p transport based on the TCP networking stack.

Example

import { createLibp2p } from 'libp2p'
import { tcp } from '@libp2p/tcp'
import { multiaddr } from '@multiformats/multiaddr'

const node = await createLibp2p({
  transports: [
    tcp()
  ]
})

const ma = multiaddr('/ip4/123.123.123.123/tcp/1234')

// dial a TCP connection, timing out after 10 seconds
const connection = await node.dial(ma, {
  signal: AbortSignal.timeout(10_000)
})

// use connection...

Install

$ npm i @libp2p/tcp

API Docs

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Keywords

FAQs

Package last updated on 18 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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