relay

package
v4.0.3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ID protocol.ID = "/ipfs/relay/line/0.1.0"

ID is the protocol.ID of the Relay Service.

Variables

This section is empty.

Functions

func ReadHeader

func ReadHeader(r io.Reader) (src, dst peer.ID, err error)

func WriteHeader

func WriteHeader(w io.Writer, src, dst peer.ID) error

Types

type RelayService

type RelayService struct {
	// contains filtered or unexported fields
}

Relay is a structure that implements ProtocolRelay. It is a simple relay service which forwards traffic between two directly connected peers.

the protocol is very simple:

/ipfs/relay\n
<multihash src id>
<multihash dst id>
<data stream>

func NewRelayService

func NewRelayService(h host.Host, sh inet.StreamHandler) *RelayService

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL