nettool

package
v0.0.52 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MDNSServiceBaseInfo = map[string]string{
	"name":                 "OpenIoTHub服务",
	"model":                "com.iotserv.services.web",
	"author":               "Farry",
	"email":                "newfarry@126.com",
	"home-page":            "https://github.com/OpenIoTHub",
	"firmware-respository": "https://github.com/iotdevice",
	"firmware-version":     "1.0",
}

Functions

func CheckComponentExist

func CheckComponentExist(model string) (bool, error)

func CheckmDNSServiceInfo

func CheckmDNSServiceInfo(info map[string]string) error

检查mdns发布的服务的信息是否存在错误

func GetExternalIpPortByKCP added in v0.0.27

func GetExternalIpPortByKCP(listener *net.UDPConn, token *models.TokenClaims) (*net.UDPAddr, error)

获取一个listener的外部地址和端口

func GetExternalIpPortByUDP added in v0.0.27

func GetExternalIpPortByUDP(listener *net.UDPConn, token *models.TokenClaims) (*net.UDPAddr, error)

获取一个listener的外部地址和端口

func GetMacs

func GetMacs() ([]string, error)

func GetOneFreeTcpPort

func GetOneFreeTcpPort() (int, error)

获取一个随机空闲的tcp端口

func RegistermDNSService

func RegistermDNSService(info map[string]string, port int) (*zeroconf.Server, error)

func RunKCPApiServer added in v0.0.27

func RunKCPApiServer(port int)

func RunUDPApiServer added in v0.0.27

func RunUDPApiServer(port int)

func SetYamuxConn added in v0.0.5

func SetYamuxConn(kcpconn *kcp.UDPSession)

Types

This section is empty.

Directories

Path Synopsis
p2p

Jump to

Keyboard shortcuts

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