[DEPRECATED] P2P stream multi-multiplexing in Go
Clone or download
Pull request Compare This branch is 86 commits ahead of jbenet:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gx
example
muxtest
.gitignore
.gxignore
.travis.yml
LICENSE
Makefile
README.md
codecov.yml
conn.go
conn_test.go
doc.go
group.go
handlers.go
listener.go
package.json
stream.go
stream_test.go
swarm.go
swarm_test.go

README.md

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