net

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULTWAITTIME = 5.0
View Source
const PORT = 38999
View Source
const RegisterMessage = `{"method":"registration","params":{"phoneMac":"AAAAAAAAAAAA","register":false,"phoneIp":"1.2.3.4","id":"1"}}`

Variables

This section is empty.

Functions

func CheckIfOur

func CheckIfOur(addr string) bool

func CreateUDP

func CreateUDP() (*net.UDPConn, error)

Types

type BroadcastProtocol

type BroadcastProtocol struct {
	Reg           models.BulbRegistry
	BroadcastAddr *net.UDPAddr
	Transport     *net.UDPConn
}

func NewProtocol

func NewProtocol(addr ...string) (*BroadcastProtocol, error)

func (*BroadcastProtocol) Discover

func (b *BroadcastProtocol) Discover() (string, error)

Jump to

Keyboard shortcuts

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