link

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: LGPL-3.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

Link used to establish

func NewLink(id common.PeerId, c net.Conn, msgChan chan *types.MsgPayload) *Link

func (*Link) CloseConn

func (this *Link) CloseConn()

close connection

func (*Link) GetAddr

func (this *Link) GetAddr() string

get address

func (*Link) GetConn

func (this *Link) GetConn() net.Conn

get connection

func (*Link) GetRXTime

func (this *Link) GetRXTime() int64

GetRXTime return the latest message time

func (*Link) Rx

func (this *Link) Rx()

func (*Link) Send added in v1.6.0

func (this *Link) Send(msg types.Message) error

func (*Link) SendRaw added in v1.6.0

func (this *Link) SendRaw(rawPacket []byte) error

func (*Link) SetConn

func (this *Link) SetConn(conn net.Conn)

set connection

func (*Link) UpdateRXTime

func (this *Link) UpdateRXTime(t time.Time)

record latest message time

Jump to

Keyboard shortcuts

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