network

package
v0.0.0-...-136fc2d Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Acceptor

type Acceptor struct {
	//config
	Cfg *util.Config

	//Status
	Status uint

	//chosen inet
	Inet net.Interface

	//listening port
	ListenPort uint

	//Listener
	Listener net.Listener

	//channel used to serve incoming TCP connections
	EnteringChan chan net.Conn

	//channel used for generic incoming requests
	RequestChan chan util.Request
	// contains filtered or unexported fields
}

func (*Acceptor) Init

func (a *Acceptor) Init() error

func (*Acceptor) Run

func (a *Acceptor) Run() error

func (*Acceptor) WaitForStatus

func (a *Acceptor) WaitForStatus(status uint) error

type MCastHelper

type MCastHelper struct {
	//config
	Cfg *util.Config

	//Status
	Status uint

	//Node ID
	NodeID uint64

	//chosen inet
	Inet net.Interface

	//channels used to receive Alive messages (UDP)
	AliveChanIncoming chan []byte

	//channels used to receive Incremental messages (UDP)
	IncrementalChanIncoming chan []byte

	//channels used to send UPD messages
	MCastChanOutgoing chan []byte

	//channel used for generic incoming requests
	RequestChan chan util.Request
	// contains filtered or unexported fields
}

func (*MCastHelper) Init

func (m *MCastHelper) Init() error

func (*MCastHelper) Run

func (m *MCastHelper) Run() error

func (*MCastHelper) WaitForStatus

func (m *MCastHelper) WaitForStatus(status uint) error

type Streamer

type Streamer struct {
	//config
	Cfg *util.Config
	// contains filtered or unexported fields
}

func (*Streamer) DialAndReceiveSnapshotBuffer

func (s *Streamer) DialAndReceiveSnapshotBuffer(address string) ([]byte, error)

func (*Streamer) Init

func (s *Streamer) Init() error

func (*Streamer) SendSnapshotBuffer

func (s *Streamer) SendSnapshotBuffer(conn net.Conn, buff []byte) error

Jump to

Keyboard shortcuts

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