relay

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

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

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