retransmit

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BehaviourImpl

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

func NewBehaviour

func NewBehaviour(knownPeers *utils.KnownPeers, peerSpawner PeerSpawner, scheme proto.Scheme) *BehaviourImpl

func (*BehaviourImpl) ActiveConnections

func (a *BehaviourImpl) ActiveConnections() *utils.Addr2Peers

func (*BehaviourImpl) Address

func (a *BehaviourImpl) Address(ctx context.Context, addr string)

func (*BehaviourImpl) AskAboutKnownPeers

func (a *BehaviourImpl) AskAboutKnownPeers()

func (*BehaviourImpl) Counter

func (a *BehaviourImpl) Counter() *utils.Counter

func (*BehaviourImpl) IncomeConnection

func (a *BehaviourImpl) IncomeConnection(ctx context.Context, c net.Conn)

func (*BehaviourImpl) InfoMessage

func (a *BehaviourImpl) InfoMessage(info peer.InfoMessage)

func (*BehaviourImpl) KnownPeers

func (a *BehaviourImpl) KnownPeers() *utils.KnownPeers

func (*BehaviourImpl) ProtoMessage

func (a *BehaviourImpl) ProtoMessage(incomeMessage peer.ProtoMessage)

func (*BehaviourImpl) SendAllMyKnownPeers

func (a *BehaviourImpl) SendAllMyKnownPeers()

func (*BehaviourImpl) SpawnKnownPeers

func (a *BehaviourImpl) SpawnKnownPeers(ctx context.Context)

func (*BehaviourImpl) SpawnedPeers

func (a *BehaviourImpl) SpawnedPeers() *utils.SpawnedPeers

func (*BehaviourImpl) Stop

func (a *BehaviourImpl) Stop()

type PeerOutgoingSpawnerImpl

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

func NewPeerSpawner

func NewPeerSpawner(pool bytespool.Pool, skipFunc conn.SkipFilter, parent peer.Parent, WavesNetwork string, declAddr proto.TCPAddr) *PeerOutgoingSpawnerImpl

func (*PeerOutgoingSpawnerImpl) SpawnIncoming

func (a *PeerOutgoingSpawnerImpl) SpawnIncoming(ctx context.Context, c net.Conn)

func (*PeerOutgoingSpawnerImpl) SpawnOutgoing

func (a *PeerOutgoingSpawnerImpl) SpawnOutgoing(ctx context.Context, address string)

type PeerSpawner

type PeerSpawner interface {
	SpawnOutgoing(ctx context.Context, address string)
	SpawnIncoming(ctx context.Context, c net.Conn)
}

type Retransmitter

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

Base struct that makes transaction transmit

func NewRetransmitter

func NewRetransmitter(behaviour *BehaviourImpl, parent peer.Parent) *Retransmitter

creates new Retransmitter

func (*Retransmitter) Address

func (a *Retransmitter) Address(ctx context.Context, addr string)

func (*Retransmitter) Run

func (a *Retransmitter) Run(ctx context.Context)

this function starts main process of transaction transmitting

func (*Retransmitter) ServeIncomingConnections

func (a *Retransmitter) ServeIncomingConnections(ctx context.Context, listenAddr string) error

listen incoming connections on provided address

type TransactionList

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

transactions cache

func NewTransactionList

func NewTransactionList(size int, scheme proto.Scheme) *TransactionList

func (*TransactionList) Add

func (a *TransactionList) Add(transaction proto.Transaction)

func (*TransactionList) Exists

func (a *TransactionList) Exists(transaction proto.Transaction) bool

func (*TransactionList) Len

func (a *TransactionList) Len() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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