identify

package
v0.0.0-...-2963f48 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2015 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

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

ID is the protocol.ID of the Identify Service.

Variables

View Source
var ClientVersion = "go-ipfs/" + config.CurrentVersionNumber
View Source
var IpfsVersion *semver.Version

IpfsVersion holds the current protocol version for a client running this code

Functions

This section is empty.

Types

type IDService

type IDService struct {
	Host host.Host
	// contains filtered or unexported fields
}

IDService is a structure that implements ProtocolIdentify. It is a trivial service that gives the other peer some useful information about the local peer. A sort of hello.

The IDService sends:

  • Our IPFS Protocol Version
  • Our IPFS Agent Version
  • Our public Listen Addresses

func NewIDService

func NewIDService(h host.Host) *IDService

func (*IDService) IdentifyConn

func (ids *IDService) IdentifyConn(c inet.Conn)

func (*IDService) IdentifyWait

func (ids *IDService) IdentifyWait(c inet.Conn) <-chan struct{}

IdentifyWait returns a channel which will be closed once "ProtocolIdentify" (handshake3) finishes on given conn. This happens async so the connection can start to be used even if handshake3 knowledge is not necesary. Users **MUST** call IdentifyWait _after_ IdentifyConn

func (*IDService) RequestHandler

func (ids *IDService) RequestHandler(s inet.Stream)

func (*IDService) ResponseHandler

func (ids *IDService) ResponseHandler(s inet.Stream)

Directories

Path Synopsis
Package identify_pb is a generated protocol buffer package.
Package identify_pb is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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