gxnet

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2018 License: Apache-2.0 Imports: 4 Imported by: 45

Documentation

Overview

Package gxnet encapsulates some network functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOutboundIP added in v0.3.0

func GetOutboundIP() (string, error)

Get preferred outbound ip of this machine

func HostAddress

func HostAddress(host string, port int) string

HostAddress composes a ip:port style address. Its opposite function is net.SplitHostPort.

func HostAddress2

func HostAddress2(host string, port string) string

func HostPort

func HostPort(addr string) (string, string, error)

func IsSameAddr added in v0.3.0

func IsSameAddr(a1, a2 net.Addr) bool

refers from https://github.com/facebookgo/grace/blob/master/gracenet/net.go#L180:6

func WSHostAddress

func WSHostAddress(host string, port int, path string) string

func WSHostAddress2

func WSHostAddress2(host string, port string, path string) string

func WSSHostAddress

func WSSHostAddress(host string, port int, path string) string

func WSSHostAddress2

func WSSHostAddress2(host string, port string, path string) string

Types

This section is empty.

Directories

Path Synopsis
Package gxreuseport provides a function that returns a net.Listener powered by a net.FileListener with a SO_REUSEPORT option set to the socket.
Package gxreuseport provides a function that returns a net.Listener powered by a net.FileListener with a SO_REUSEPORT option set to the socket.
2017-10-31 14:30 Package gxurl implements URL function encapsulation
2017-10-31 14:30 Package gxurl implements URL function encapsulation

Jump to

Keyboard shortcuts

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