models

package
v0.0.0-...-7454124 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MulticastAddress string
	LimitMessages    int
	InvalidFrequent  int
}

type Message

type Message struct {
	Payload  []byte
	Checksum []byte
}

func NewMessage

func NewMessage(payload []byte) (Message, error)

func (Message) Compare

func (m Message) Compare(b Message) int

func (Message) GetHash

func (m Message) GetHash() []byte

func (Message) GetPayload

func (m Message) GetPayload() []byte

func (Message) IsEmpty

func (m Message) IsEmpty() bool

func (Message) IsValid

func (m Message) IsValid() bool

type Peer

type Peer struct {
	IP   net.IP
	Port uint16
}

func (Peer) ToString

func (p Peer) ToString() string

type WelcomePack

type WelcomePack struct {
	PeerList []Peer
	Msg      Message
}

Jump to

Keyboard shortcuts

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