multicast

package
v0.0.0-...-72c7af3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoIPv6 = errors.New("Couldn't find any IPv6 network intefaces")

ErrNoIPv6 error if no IPv6 interfaces were found

Functions

This section is empty.

Types

type Multicast

type Multicast struct {
	Address string
	// contains filtered or unexported fields
}

Multicast struct

func (*Multicast) Done

func (m *Multicast) Done() <-chan struct{}

Done returns a channel that can be used to wait till send is stopped

func (*Multicast) Listen

func (m *Multicast) Listen(ctx context.Context) (<-chan Response, error)

Listen when a multicast is received we serve it

func (*Multicast) Send

func (m *Multicast) Send(ctx context.Context, payload []byte) error

Send out to try to find others listening

func (*Multicast) SendErr

func (m *Multicast) SendErr() error

SendErr returns any send errors TODO: Verify this is needed

func (*Multicast) Stop

func (m *Multicast) Stop()

Stop quits sending over multicast

type Response

type Response struct {
	Payload []byte
	SrcIP   net.IP
}

Response struct is sent over a channel when a pong is successful

Jump to

Keyboard shortcuts

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