v030

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package v030 is a collection of classes for p2p version 0.3.0 It contains IO, handshake, handlers, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type V030Handshaker

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

V030Handshaker exchange status data over protocol version .0.3.0

func NewV030VersionedHS

func NewV030VersionedHS(pm p2pcommon.PeerManager, actor p2pcommon.ActorService, log *log.Logger, chainID *types.ChainID, peerID types.PeerID, rwc io.ReadWriteCloser) *V030Handshaker

func (*V030Handshaker) DoForInbound

func (h *V030Handshaker) DoForInbound(ctx context.Context) (*p2pcommon.HandshakeResult, error)

DoForInbound is handle handshake from inbound peer

func (*V030Handshaker) DoForOutbound

func (h *V030Handshaker) DoForOutbound(ctx context.Context) (*p2pcommon.HandshakeResult, error)

handshakeOutboundPeer start handshake with outbound peer

func (*V030Handshaker) GetMsgRW

func (h *V030Handshaker) GetMsgRW() p2pcommon.MsgReadWriter

type V030ReadWriter

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

func NewV030MsgPipe

func NewV030MsgPipe(s io.ReadWriteCloser) *V030ReadWriter

func NewV030ReadWriter

func NewV030ReadWriter(r io.Reader, w io.Writer, c io.Closer) *V030ReadWriter

func (*V030ReadWriter) AddIOListener

func (rw *V030ReadWriter) AddIOListener(l p2pcommon.MsgIOListener)

func (*V030ReadWriter) Close

func (rw *V030ReadWriter) Close() error

func (*V030ReadWriter) ReadMsg

func (rw *V030ReadWriter) ReadMsg() (p2pcommon.Message, error)

ReadMsg() must be used in single thread

func (*V030ReadWriter) WriteMsg

func (rw *V030ReadWriter) WriteMsg(msg p2pcommon.Message) error

WriteMsg() must be used in single thread

type V032Handshaker

type V032Handshaker struct {
	V030Handshaker
	// contains filtered or unexported fields
}

V032Handshaker exchange status data over protocol version .0.3.1 it

func NewV032VersionedHS

func NewV032VersionedHS(pm p2pcommon.PeerManager, actor p2pcommon.ActorService, log *log.Logger, chainID *types.ChainID, peerID types.PeerID, rwc io.ReadWriteCloser, genesis []byte) *V032Handshaker

func (*V032Handshaker) DoForInbound

func (h *V032Handshaker) DoForInbound(ctx context.Context) (*p2pcommon.HandshakeResult, error)

func (*V032Handshaker) DoForOutbound

func (h *V032Handshaker) DoForOutbound(ctx context.Context) (*p2pcommon.HandshakeResult, error)

func (*V032Handshaker) GetMsgRW

func (h *V032Handshaker) GetMsgRW() p2pcommon.MsgReadWriter

type V033Handshaker

type V033Handshaker struct {
	V032Handshaker
	// contains filtered or unexported fields
}

V033Handshaker exchange status data over protocol version .0.3.1 it

func (*V033Handshaker) DoForInbound

func (h *V033Handshaker) DoForInbound(ctx context.Context) (*p2pcommon.HandshakeResult, error)

func (*V033Handshaker) DoForOutbound

func (h *V033Handshaker) DoForOutbound(ctx context.Context) (*p2pcommon.HandshakeResult, error)

func (*V033Handshaker) GetMsgRW

func (h *V033Handshaker) GetMsgRW() p2pcommon.MsgReadWriter

Jump to

Keyboard shortcuts

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