AEDAclient

package
v0.0.0-...-2e12031 Latest Latest
Warning

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

Go to latest
Published: May 26, 2018 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisconnectUDPClient

func DisconnectUDPClient(client *UDPClient)

DisconnectUDPClient disconnects a client from its server

func SendMessageToServer

func SendMessageToServer(client *UDPClient, event eventmessage.EventMessage)

SendMessageToServer sends a message to the connected server

Types

type ServerMessage

type ServerMessage struct {
	Addr *net.UDPAddr
	Msg  []byte
}

type UDPClient

type UDPClient struct {
	DebugMode bool

	Conn    *net.UDPConn
	SrvAddr *net.UDPAddr

	ResQueue chan ServerMessage
	// contains filtered or unexported fields
}

The UDPClient struct holds the udp client of AEDAclient

func ConnectUDPClient

func ConnectUDPClient(srvAddr *net.UDPAddr, ccfg AEDAcrypt.CryptCfg) (*UDPClient, error)

ConnectUDPClient function connects a client to a server

func (*UDPClient) Write

func (client *UDPClient) Write(addr *net.UDPAddr, msg []byte)

type UDPPacket

type UDPPacket struct {
	Addr *net.UDPAddr
	Buf  []byte
}

Jump to

Keyboard shortcuts

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