Skip to content

isabella232/go-peerstream

 
 

Repository files navigation

go-peerstream

standard-readme compliant GoDoc Build Status Coverage Status

P2P stream multi-multiplexing in Go

Package peerstream is a peer-to-peer networking library that multiplexes connections to many hosts. It attempts to simplify the complexity of:

  • accepting incoming connections over multiple listeners
  • dialing outgoing connections over multiple transports
  • multiplexing multiple connections per-peer
  • multiplexing multiple different servers or protocols
  • handling backpressure correctly
  • handling stream multiplexing
  • providing a simple interface to the user

Table of Contents

Install

go-peerstream is a standard Go module which can be installed with:

go get github.com/libp2p/go-peerstream

Note that go-peerstream is packaged with Gx, so it is recommended to use Gx to install and use it (see Usage section).

Usage

Using Gx and Gx-go

This module is packaged with Gx. In order to use it in your own project it is recommended that you:

go get -u github.com/whyrusleeping/gx
go get -u github.com/whyrusleeping/gx-go
cd <your-project-repository>
gx init
gx import github.com/libp2p/go-peerstream
gx install --global
gx-go --rewrite

Please check Gx and Gx-go documentation for more information.

Example

See example/example.go and example/blockhandler/blockhandler.go for examples covering the functionality of go-peerstream.

To build the examples, please make sure to run make in the examples/ folder.

Maintainers

This project is maintained by @hsanjuan.

Contribute

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © Protocol Labs, Inc

About

[DEPRECATED] P2P stream multi-multiplexing in Go

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.7%
  • Makefile 1.3%