util

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: MIT Imports: 11 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIP

func GetIP(addr string) string

func GetIPFromSTUN

func GetIPFromSTUN(stunURL string) string

func GetIntefaceIP

func GetIntefaceIP() string

func GetLostSN

func GetLostSN(begin, bitmap uint16) []uint16

func GetMills

func GetMills() int64

func GetPort

func GetPort(addr string) string

func IsLocalIP

func IsLocalIP(ip string) bool

func KvOK added in v0.4.2

func KvOK(m map[string]interface{}, k, v string) bool

KvOK check flag and value

func Map

func Map(args ...interface{}) map[string]interface{}

make kv to map, args should be multiple of 2

func Marshal

func Marshal(m map[string]interface{}) string

func MarshalStr

func MarshalStr(args ...interface{}) string

func MarshalStrMap

func MarshalStrMap(m map[string]string) string

func NewNpError added in v0.2.0

func NewNpError(code int, reason string) *nprotoo.Error

func RandStr

func RandStr(l int) string

func Recover

func Recover(flag string)

func StrToUint32

func StrToUint32(str string) uint32

func StrToUint8

func StrToUint8(str string) uint8

func Unmarshal

func Unmarshal(str string) map[string]interface{}

func Val

func Val(msg map[string]interface{}, key string) string

get value from map

Types

This section is empty.

Jump to

Keyboard shortcuts

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