iputil

package
v0.0.0-...-5dc8409 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultEndpoint4Protocol

func DefaultEndpoint4Protocol(proto string) string

DefaultEndpoint4Protocol : To ensure consistency, we generate default addr for listenAddress and advertiseAddress by one method. To avoid unnecessary port allocation work, we allocate fixed port for user defined protocol.

func DefaultIPv4BindAddress

func DefaultIPv4BindAddress() (net.IP, error)

DefaultIPv4BindAddress is a function which binds IP address for corresponding interface

func DefaultPort4Protocol

func DefaultPort4Protocol(proto string) string

DefaultPort4Protocol returns the default port for different protocols

func GetHostName

func GetHostName() string

GetHostName is function which returns hostname

func GetLocalIP

func GetLocalIP() string

GetLocalIP 获得本机IP

func Localhost

func Localhost() string

Localhost is a function which returns localhost IP address

Types

This section is empty.

Jump to

Keyboard shortcuts

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