link

package
v0.0.0-...-ef73a9a Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: LGPL-3.0 Imports: 11 Imported by: 0

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

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

func (*Link) SendRaw

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