Documentation ¶
Index ¶
- type Message
- func (msg *Message) BlockDataForUDP(ctx context.Context, envelope *udp.Envelope) (*udp.Status, error)
- func (msg *Message) Peer2UDP()
- func (msg *Message) SendBlock2Peer()
- func (msg *Message) SendResponse(conn *net.UDPConn, addr *net.UDPAddr, res string)
- func (msg *Message) UDPBlockHandler()
- func (msg *Message) UDPBlockSender()
- func (msg *Message) UDPServerListen()
- func (msg *Message) WaitPeerConnection()
- type RaptorCodec
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 (*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 ¶
Click to show internal directories.
Click to hide internal directories.