hlfudp

package
v0.0.0-...-3452757 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Block           *udp.Envelope
	PeerContainerIP string
	Fountain        *RaptorCodec
	Key             []byte
	IV              []byte
}

Message means received block data

func (*Message) BlockDataForUDP

func (msg *Message) BlockDataForUDP(ctx context.Context, envelope *udp.Envelope) (*udp.Status, error)

BlockDataForUDP forwards the block data over UDP protocols. It stores the block that received through gRPC call, then forward the block data to UDP transmission functions.

func (*Message) Peer2UDP

func (msg *Message) Peer2UDP()

Peer2UDP listens connections from the peer container for forwarding block data. This function is working based on gRPC.

func (*Message) SendBlock2Peer

func (msg *Message) SendBlock2Peer()

func (*Message) SendResponse

func (msg *Message) SendResponse(conn *net.UDPConn, addr *net.UDPAddr, res string)

func (*Message) UDPBlockHandler

func (msg *Message) UDPBlockHandler()

func (*Message) UDPBlockSender

func (msg *Message) UDPBlockSender()

func (*Message) UDPServerListen

func (msg *Message) UDPServerListen()

func (*Message) WaitPeerConnection

func (msg *Message) WaitPeerConnection()

WaitPeerConnection receives Peer Endpoint from the peer container, and then saves it.

type RaptorCodec

type RaptorCodec struct {
	RTSize int
	RTData []byte
}

Jump to

Keyboard shortcuts

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