Documentation ¶
Index ¶
- func Addr(addr net.Addr) net.Addr
- func Host(addr net.Addr) string
- func NewAddr(network, host string, port uint16) net.Addr
- func Parse(addr string, network string) (net.Addr, error)
- func Port(addr net.Addr) uint16
- func WrapAddr(addr net.Addr) (net.Addr, error)
- func WrapConn(conn net.Conn) (net.Conn, error)
- type HostPortAddr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HostPortAddr ¶
type HostPortAddr interface { // Host returns the host part from the address. Host() string // Port returns the port part from the address. // Zero value means the port is unspecified. Port() uint16 }
HostPortAddr provides the host and port of an address in cases where use of host, port, err := net.SplitHostPort(addressString) is too much and an error is unexpected or ignored.
func HostPort ¶
func HostPort(addr net.Addr) HostPortAddr
HostPort is like Addr, but directly returns it's HostPortAddr.
Click to show internal directories.
Click to hide internal directories.