utils

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LegionAddress

type LegionAddress struct {
	Host string `json:"host"`
	Port uint16 `json:"port"`
}

LegionAddress is a comparable type with a few convinience methods

func LegionAddressFromString

func LegionAddressFromString(addrString string) LegionAddress

LegionAddressFromString returns a LegionAddress from a string

func NewLegionAddress

func NewLegionAddress(host string, port uint16) LegionAddress

NewLegionAddress returns a LegionAddress object

func (LegionAddress) IsValid

func (k LegionAddress) IsValid() bool

IsValid returns true if the address is valid, false if not

func (LegionAddress) String

func (k LegionAddress) String() string

String returns a formatted KCP address like "host:port"

Jump to

Keyboard shortcuts

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