network

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunIncomingPeer

func RunIncomingPeer(ctx context.Context, params IncomingPeerParams)

func RunOutgoingPeer

func RunOutgoingPeer(ctx context.Context, params OutgoingPeerParams)

Types

type IncomingPeer

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

func (*IncomingPeer) Close

func (a *IncomingPeer) Close() error

func (*IncomingPeer) Connection

func (a *IncomingPeer) Connection() conn.Connection

func (*IncomingPeer) Direction

func (a *IncomingPeer) Direction() peer.Direction

func (*IncomingPeer) Handshake

func (a *IncomingPeer) Handshake() proto.Handshake

func (*IncomingPeer) ID

func (a *IncomingPeer) ID() string

func (*IncomingPeer) RemoteAddr

func (a *IncomingPeer) RemoteAddr() proto.TCPAddr

func (*IncomingPeer) SendMessage

func (a *IncomingPeer) SendMessage(m proto.Message)

type IncomingPeerParams

type IncomingPeerParams struct {
	WavesNetwork string
	Conn         net.Conn
	Parent       peer.Parent
	DeclAddr     proto.TCPAddr
	Pool         bytespool.Pool
	Skip         conn.SkipFilter
}

type OutgoingPeer

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

func (*OutgoingPeer) Close

func (a *OutgoingPeer) Close() error

func (*OutgoingPeer) Connection

func (a *OutgoingPeer) Connection() conn.Connection

func (*OutgoingPeer) Direction

func (a *OutgoingPeer) Direction() peer.Direction

func (*OutgoingPeer) Handshake

func (a *OutgoingPeer) Handshake() proto.Handshake

func (*OutgoingPeer) ID

func (a *OutgoingPeer) ID() string

func (*OutgoingPeer) RemoteAddr

func (a *OutgoingPeer) RemoteAddr() proto.TCPAddr

func (*OutgoingPeer) SendMessage

func (a *OutgoingPeer) SendMessage(m proto.Message)

type OutgoingPeerParams

type OutgoingPeerParams struct {
	Address      string
	WavesNetwork string
	Parent       peer.Parent
	Pool         bytespool.Pool
	DeclAddr     proto.TCPAddr
	Skip         conn.SkipFilter
}

Jump to

Keyboard shortcuts

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