devservice

package
v0.0.0-...-dddc173 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(n, addr string, mu MsgUp) error

ListenAndServe binds to the given address and serve requests forever.

func Server

func Server(listener *net.UDPConn, mu MsgUp) error

Server processes incoming UDP packets on the given listener, and processes these requests forever until the listener is closed

Types

type MsgUp

type MsgUp interface {
	// Handle the message and optionally return a response message.
	EncodeAutoup(data map[string]interface{}) error
}

MsgUp ...

type PackHandler

type PackHandler interface {
	PackageParser([]byte) ([]byte, error)
}

PackHandler ..

Jump to

Keyboard shortcuts

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