gxnet

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2020 License: Apache-2.0 Imports: 3 Imported by: 53

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLocalIP

func GetLocalIP() (string, error)

GetLocalIP get local ip

func IsSameAddr added in v1.5.2

func IsSameAddr(addr1, addr2 net.Addr) bool

refer from https://github.com/facebookarchive/grace/blob/master/gracenet/net.go#L180

func ListenOnTCPRandomPort added in v1.9.0

func ListenOnTCPRandomPort(ip string) (*net.TCPListener, error)

ListenOnTCPRandomPort a tcp server listening on a random port by tcp protocol

func ListenOnUDPRandomPort added in v1.9.0

func ListenOnUDPRandomPort(ip string) (*net.UDPConn, error)

ListenOnUDPRandomPort a udp endpoint listening on a random port

Types

This section is empty.

Jump to

Keyboard shortcuts

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