src

package
v0.0.0-...-1ab6266 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UID = uuid.Must(uuid.FromString("1751b2a1-0ffd-44fe-8a2e-d3f153125c43")).Bytes()

Functions

func Secret

func Secret() ([]byte, error)

Types

type Client

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

func NewClient

func NewClient(cfg *Config) (*Client, error)

func (*Client) Run

func (client *Client) Run(ctx context.Context, peerID uuid.UUID, handler Handler) error

type Config

type Config struct {
	Peer struct {
		ID           string
		PortCaller   uint16
		PortListener uint16
	}
	Server struct {
		Port uint16
		Addr string
	}
	Fec struct {
		DataParts  uint64
		TotalParts uint64
	}
	Encoder struct {
		DispatcherTimeout uint64
		DispatcherSize    uint64
	}
	Decoder struct {
		AssemblerSize  uint64
		DispatcherSize uint64
	}
}

type Handler

type Handler interface {
	Reader(server *net.UDPConn) (io.ReadCloser, error)
	Writer(server *net.UDPConn) (io.WriteCloser, error)
}

type Reporter

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

func NewReporter

func NewReporter(writer chan []byte, header string) (*Reporter, error)

func (Reporter) Report

func (r Reporter) Report(total, delta uint64)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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