mock

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Peer

type Peer struct {
	Addr                  string
	SendMessageCalledWith []proto.Message
	IncomeCh              chan peer.ProtoMessage
	HandshakeField        proto.Handshake
	RemoteAddress         proto.TCPAddr
	// contains filtered or unexported fields
}

func NewPeer

func NewPeer() *Peer

func (*Peer) Close

func (*Peer) Close() error

func (*Peer) Connection

func (*Peer) Connection() conn.Connection

func (*Peer) Direction

func (*Peer) Direction() peer.Direction

func (*Peer) Handshake

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

func (*Peer) ID

func (a *Peer) ID() string

func (*Peer) Reconnect

func (*Peer) Reconnect() error

func (*Peer) RemoteAddr

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

func (*Peer) SendMessage

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

Jump to

Keyboard shortcuts

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