23 September 2017

Table of Contents

Constants

const (
      IPv4len = 4
      IPv6len = 16
)

Variables

var (
      IPv4bcast     = IPv4(255, 255, 255, 255) // limited broadcast
      IPv4allsys    = IPv4(224, 0, 0, 1)       // all systems
      IPv4allrouter = IPv4(224, 0, 0, 2)       // all routers
      IPv4zero      = IPv4(0, 0, 0, 0)         // all zeros
)

var (
      IPv6zero                   = IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
      IPv6unspecified            = IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
      IPv6loopback               = IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}
      IPv6interfacelocalallnodes = IP{0xff, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01}
      IPv6linklocalallnodes      = IP{0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01}
      IPv6linklocalallrouters    = IP{0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x02}
)

var DefaultResolver = &Resolver{}

var (ErrWriteToConnected = errors.New("use of WriteTo with pre-connected connection"))

function

func InterfaceAddrs() ([]Addr, error)

Interfaces returns a list of the system's network interfaces.

func Interfaces() ([]Interface, error)

returns "[host]:port"

func JoinHostPort(host, port string) string

func LookupAddr(addr string) (names []string, err error)

func LookupCNAME(host string) (cname string, err error)

func LookupHost(host string) (addrs []string, err error)

func LookupIP(host string) ([]IP, error)

func LookupMX(name string) ([]*MX, error)

type MX struct {
     Host string
     Pref uint16
}

func LookupNS(name string) ([]*NS, error)

type NS struct {
     Host string
}

func LookupPort(network, service string) (port int, err error)

func LookupSRV(service, proto, name string) (cname string, addrs []*SRV, err error)

func LookupTXT(name string) ([]string, error)

func SplitHostPort(hostport string) (host, port string, err error)

type Addr

type Addr interface {
      Network() string // name of the network (for example, "tcp", "udp")
      String() string  // string form of address (for example, "192.0.2.1:25", "[2001:db8::1]:80")
}

type AddrError

type AddrError struct {
      Err  string
      Addr string
}

func (e *AddrError) Error() string

func (e *AddrError) Temporary() bool

func (e *AddrError) Timeout() bool

type Buffers

type Buffers [][]byte

func (v *Buffers) Read(p []byte) (n int, err error)

func (v *Buffers) WriteTo(w io.Writer) (n int64, err error)

type Conn

type Conn interface {
      // Read reads data from the connection.
      // Read can be made to time out and return an Error with Timeout() == true
      // after a fixed time limit; see SetDeadline and SetReadDeadline.
      Read(b []byte) (n int, err error)

      // Write writes data to the connection.
      // Write can be made to time out and return an Error with Timeout() == true
      // after a fixed time limit; see SetDeadline and SetWriteDeadline.
      Write(b []byte) (n int, err error)

      // Close closes the connection.
      // Any blocked Read or Write operations will be unblocked and return errors.
      Close() error

      // LocalAddr returns the local network address.
      LocalAddr() Addr

      // RemoteAddr returns the remote network address.
      RemoteAddr() Addr

      // SetDeadline sets the read and write deadlines associated
      // with the connection. It is equivalent to calling both
      // SetReadDeadline and SetWriteDeadline.
      //
      // A deadline is an absolute time after which I/O operations
      // fail with a timeout (see type Error) instead of
      // blocking. The deadline applies to all future and pending
      // I/O, not just the immediately following call to Read or
      // Write. After a deadline has been exceeded, the connection
      // can be refreshed by setting a deadline in the future.
      //
      // An idle timeout can be implemented by repeatedly extending
      // the deadline after successful Read or Write calls.
      //
      // A zero value for t means I/O operations will not time out.
      SetDeadline(t time.Time) error

      // SetReadDeadline sets the deadline for future Read calls
      // and any currently-blocked Read call.
      // A zero value for t means Read will not time out.
      SetReadDeadline(t time.Time) error

      // SetWriteDeadline sets the deadline for future Write calls
      // and any currently-blocked Write call.
      // Even if write times out, it may return n > 0, indicating that
      // some of the data was successfully written.
      // A zero value for t means Write will not time out.
      SetWriteDeadline(t time.Time) error
}

func Dial(network, address string) (Conn, error)

Dial("tcp", "golang.org:http")
Dial("tcp", "192.0.2.1:http")
Dial("tcp", "198.51.100.1:80")
Dial("udp", "[2001:db8::1]:domain")
Dial("udp", "[fe80::1%lo0]:53")
Dial("tcp", ":80")

Dial("ip4:1", "192.0.2.1")
Dial("ip6:ipv6-icmp", "2001:db8::1")
Dial("ip6:58", "fe80::1%lo0")

func DialTimeout(network, address string, timeout time.Duration) (Conn, error)

func FileConn(f *os.File) (c Conn, err error)

FileConn returns a copy of the network connection corresponding to the open file f. It is the caller's responsibility to close f when finished. Closing c does not affect f, and closing f does not affect c.

func Pipe() (Conn, Conn)

func Pipe() (Conn, Conn) {
     r1, w1 := io.Pipe()
     r2, w2 := io.Pipe()

     return &pipe{r1, w2}, &pipe{r2, w1}
}

type pipe struct {
     *io.PipeReader
     *io.PipeWriter
}

type DNSConfigError

func (e *DNSConfigError) Error() string

func (e *DNSConfigError) Temporary() bool

func (e *DNSConfigError) Timeout() bool

type DNSError

func (e *DNSError) Error() string

func (e *DNSError) Temporary() bool

func (e *DNSError) Timeout() bool

type Dialer

type Dialer struct {
      // Timeout is the maximum amount of time a dial will wait for
      // a connect to complete. If Deadline is also set, it may fail
      // earlier.
      //
      // The default is no timeout.
      //
      // When using TCP and dialing a host name with multiple IP
      // addresses, the timeout may be divided between them.
      //
      // With or without a timeout, the operating system may impose
      // its own earlier timeout. For instance, TCP timeouts are
      // often around 3 minutes.
      Timeout time.Duration

      // Deadline is the absolute point in time after which dials
      // will fail. If Timeout is set, it may fail earlier.
      // Zero means no deadline, or dependent on the operating system
      // as with the Timeout option.
      Deadline time.Time

      // LocalAddr is the local address to use when dialing an
      // address. The address must be of a compatible type for the
      // network being dialed.
      // If nil, a local address is automatically chosen.
      LocalAddr Addr

      // DualStack enables RFC 6555-compliant "Happy Eyeballs"
      // dialing when the network is "tcp" and the host in the
      // address parameter resolves to both IPv4 and IPv6 addresses.
      // This allows a client to tolerate networks where one address
      // family is silently broken.
      DualStack bool

      // FallbackDelay specifies the length of time to wait before
      // spawning a fallback connection, when DualStack is enabled.
      // If zero, a default delay of 300ms is used.
      FallbackDelay time.Duration

      // KeepAlive specifies the keep-alive period for an active
      // network connection.
      // If zero, keep-alives are not enabled. Network protocols
      // that do not support keep-alives ignore this field.
      KeepAlive time.Duration

      // Resolver optionally specifies an alternate resolver to use.
      Resolver *Resolver

      // Cancel is an optional channel whose closure indicates that
      // the dial should be canceled. Not all types of dials support
      // cancelation.
      //
      // Deprecated: Use DialContext instead.
      Cancel <-chan struct{}
}

func (d *Dialer) Dial(network, address string) (Conn, error)

func (d *Dialer) DialContext(ctx context.Context, network, address string) (Conn, error)

type Error

type Error interface {
      error
      Timeout() bool   // Is the error a timeout?
      Temporary() bool // Is the error temporary?
}

type Flags

type Flags uint

const (
      FlagUp  Flags = 1 << iota // interface is up
      FlagBroadcast             // interface supports broadcast access capability
      FlagLoopback              // interface is a loopback interface
      FlagPointToPoint          // interface belongs to a point-to-point link
      FlagMulticast             // interface supports multicast access capability
)

func (f Flags) String() string

type HardwareAddr

func ParseMAC(s string) (hw HardwareAddr, err error)

func (a HardwareAddr) String() string

type IP

type IP []byte

func IPv4(a, b, c, d byte) IP

fmt.Println(net.IPv4(8, 8, 8, 8))

func ParseCIDR(s string) (IP, *IPNet, error)

ipv4Addr, ipv4Net, err := net.ParseCIDR("192.0.2.1/24")
if err != nil {
     log.Fatal(err)
}
fmt.Println(ipv4Addr)   // 192.0.2.1
fmt.Println(ipv4Net)            // 192.0.2.0/24

ipv6Addr, ipv6Net, err := net.ParseCIDR("2001:db8:a0b:12f0::1/32")
if err != nil {
     log.Fatal(err)
}
fmt.Println(ipv6Addr)   // 2001:db8:a0b:12f0::1
fmt.Println(ipv6Net)            // 2001:db8::/32

func ParseIP(s string) IP

fmt.Println(net.ParseIP("192.0.2.1"))
fmt.Println(net.ParseIP("2001:db8::68"))
fmt.Println(net.ParseIP("192.0.2"))

func (ip IP) DefaultMask() IPMask

ip := net.ParseIP("192.0.2.1")
fmt.Println(ip.DefaultMask())   // ffffff00

func (ip IP) Equal(x IP) bool

func (ip IP) IsGlobalUnicast() bool

func (ip IP) IsInterfaceLocalMulticast() bool

func (ip IP) IsLinkLocalMulticast() bool

func (ip IP) IsLinkLocalUnicast() bool

func (ip IP) IsLoopback() bool

func (ip IP) IsMulticast() bool

func (ip IP) IsUnspecified() bool

func (ip IP) MarshalText() ([]byte, error)

func (ip IP) Mask(mask IPMask) IP

ipv4Addr := net.ParseIP("192.0.2.1")
ipv4Mask := net.CIDRMask(24, 32)
fmt.Println(ipv4Addr.Mask(ipv4Mask))  // 192.0.2.0

ipv6Addr := net.ParseIP("2001:db8:a0b:12f0::1")
ipv6Mask := net.CIDRMask(32, 128)
fmt.Println(ipv6Addr.Mask(ipv6Mask))  // 2001:db8::

func (ip IP) String() string

func (ip IP) To16() IP

func (ip IP) To4() IP

func (ip *IP) UnmarshalText(text []byte) error

type IPAddr

type IPAddr struct {
      IP   IP
      Zone string // IPv6 scoped addressing zone
}

func ResolveIPAddr(network, address string) (*IPAddr, error)

func (a *IPAddr) Network() string

func (a *IPAddr) String() string

type IPConn

type IPConn struct {
      // contains filtered or unexported fields
}

func DialIP(network string, laddr, raddr *IPAddr) (*IPConn, error)

func ListenIP(network string, laddr *IPAddr) (*IPConn, error)

func (c *IPConn) Close() error

func (c *IPConn) File() (f *os.File, err error)

func (c *IPConn) LocalAddr() Addr

func (c *IPConn) Read(b []byte) (int, error)

func (c *IPConn) ReadFrom(b []byte) (int, Addr, error)

func (c *IPConn) ReadFromIP(b []byte) (int, *IPAddr, error)

func (c *IPConn) ReadMsgIP(b, oob []byte) (n, oobn, flags int, addr *IPAddr, err error)

func (c *IPConn) RemoteAddr() Addr

func (c *IPConn) SetDeadline(t time.Time) error

func (c *IPConn) SetReadBuffer(bytes int) error

func (c *IPConn) SetReadDeadline(t time.Time) error

func (c *IPConn) SetWriteBuffer(bytes int) error

func (c *IPConn) SetWriteDeadline(t time.Time) error

func (c *IPConn) SyscallConn() (syscall.RawConn, error)

func (c *IPConn) Write(b []byte) (int, error)

func (c *IPConn) WriteMsgIP(b, oob []byte, addr *IPAddr) (n, oobn int, err error)

func (c *IPConn) WriteTo(b []byte, addr Addr) (int, error)

func (c *IPConn) WriteToIP(b []byte, addr *IPAddr) (int, error)

type IPMask

func CIDRMask(ones, bits int) IPMask

fmt.Println(net.CIDRMask(31, 32))  // This mask corresponds to a /31 subnet for IPv4.
fmt.Println(net.CIDRMask(64, 128)) // This mask corresponds to a /64 subnet for IPv6.

func IPv4Mask(a, b, c, d byte) IPMask

fmt.Println(net.IPv4Mask(255, 255, 255, 0))

func (m IPMask) Size() (ones, bits int)

func (m IPMask) String() string

type IPNet

type IPNet struct {
      IP   IP     // network number
      Mask IPMask // network mask
}

func (n *IPNet) Contains(ip IP) bool

func (n *IPNet) Network() string

func (n *IPNet) String() string

type Interface

type Interface struct {
      Index        int          // positive integer that starts at one, zero is never used
      MTU          int          // maximum transmission unit
      Name         string       // e.g., "en0", "lo0", "eth0.100"
      HardwareAddr HardwareAddr // IEEE MAC-48, EUI-48 and EUI-64 form
      Flags        Flags        // e.g., FlagUp, FlagLoopback, FlagMulticast
}

func InterfaceByIndex(index int) (*Interface, error)

func InterfaceByName(name string) (*Interface, error)

func (ifi *Interface) Addrs() ([]Addr, error)

func (ifi *Interface) MulticastAddrs() ([]Addr, error)

type InvalidAddrError

type InvalidAddrError string

func (e InvalidAddrError) Error() string

func (e InvalidAddrError) Temporary() bool

func (e InvalidAddrError) Timeout() bool

type Listener

type Listener interface {
        // Accept waits for and returns the next connection to the listener.
        Accept() (Conn, error)

        // Close closes the listener.
        // Any blocked Accept operations will be unblocked and return errors.
        Close() error

        // Addr returns the listener's network address.
        Addr() Addr
}

func FileListener(f *os.File) (ln Listener, err error)

func Listen(network, address string) (Listener, error)

// Listen on TCP port 2000 on all available unicast and anycast IP addresses of the local system.
l, err := net.Listen("tcp", ":2000")
if err != nil {
      log.Fatal(err)
}
defer l.Close()
for {
      // Wait for a connection.
      conn, err := l.Accept()
      if err != nil {
              log.Fatal(err)
      }

      // Handle the connection in a new goroutine.
      // The loop then returns to accepting, so that
      // multiple connections may be served concurrently.
      go func(c net.Conn) {
              // Echo all incoming data.
              io.Copy(c, c)

              // Shut down the connection.
              c.Close()
      }(conn)
}

type MX

type NS

type OpError

func (e *OpError) Error() string

func (e *OpError) Temporary() bool

func (e *OpError) Timeout() bool

type PacketConn

func FilePacketConn(f *os.File) (c PacketConn, err error)

func ListenPacket(network, address string) (PacketConn, error)

type ParseError

func (e *ParseError) Error() string

type Resolver

func (r *Resolver) LookupAddr(ctx context.Context, addr string) (names []string, err error)

func (r *Resolver) LookupCNAME(ctx context.Context, host string) (cname string, err error)

func (r *Resolver) LookupHost(ctx context.Context, host string) (addrs []string, err error)

func (r *Resolver) LookupIPAddr(ctx context.Context, host string) ([]IPAddr, error)

func (r *Resolver) LookupMX(ctx context.Context, name string) ([]*MX, error)

func (r *Resolver) LookupNS(ctx context.Context, name string) ([]*NS, error)

func (r *Resolver) LookupPort(ctx context.Context, network, service string) (port int, err error)

func (r *Resolver) LookupSRV(ctx context.Context, service, proto, name string) (cname string, addrs []*SRV, err error)

func (r *Resolver) LookupTXT(ctx context.Context, name string) ([]string, error)

type SRV

type TCPAddr

func ResolveTCPAddr(network, address string) (*TCPAddr, error)

func (a *TCPAddr) Network() string

func (a *TCPAddr) String() string

type TCPConn

func DialTCP(network string, laddr, raddr *TCPAddr) (*TCPConn, error)

DialTCP acts like Dial for TCP networks.

The network must be a TCP network name; see func Dial for details.

If laddr is nil, a local address is automatically chosen. If the IP field of raddr is nil or an unspecified IP address, the local system is assumed.

func (c *TCPConn) Close() error

Close closes the connection.

func (c *TCPConn) CloseRead() error

CloseRead shuts down the reading side of the TCP connection. Most callers should just use Close.

func (c *TCPConn) CloseWrite() error

CloseWrite shuts down the writing side of the TCP connection. Most callers should just use Close.

func (c *TCPConn) File() (f *os.File, err error)

File sets the underlying os.File to blocking mode and returns a copy. It is the caller's responsibility to close f when finished. Closing c does not affect f, and closing f does not affect c.

The returned os.File's file descriptor is different from the connection's. Attempting to change properties of the original using this duplicate may or may not have the desired effect.

func (c *TCPConn) LocalAddr() Addr

LocalAddr returns the local network address. The Addr returned is shared by all invocations of LocalAddr, so do not modify it.

func (c *TCPConn) Read(b []byte) (int, error)

Read implements the Conn Read method.

func (c *TCPConn) ReadFrom(r io.Reader) (int64, error)

ReadFrom implements the io.ReaderFrom ReadFrom method.

func (c *TCPConn) RemoteAddr() Addr

RemoteAddr returns the remote network address. The Addr returned is shared by all invocations of RemoteAddr, so do not modify it.

func (c *TCPConn) SetDeadline(t time.Time) error

SetDeadline implements the Conn SetDeadline method.

func (c *TCPConn) SetKeepAlive(keepalive bool) error

SetKeepAlive sets whether the operating system should send keepalive messages on the connection.

func (c *TCPConn) SetKeepAlivePeriod(d time.Duration) error

SetKeepAlivePeriod sets period between keep alives.

func (c *TCPConn) SetLinger(sec int) error

SetLinger sets the behavior of Close on a connection which still has data waiting to be sent or to be acknowledged.

If sec < 0 (the default), the operating system finishes sending the data in the background.

If sec == 0, the operating system discards any unsent or unacknowledged data.

If sec > 0, the data is sent in the background as with sec < 0. On some operating systems after sec seconds have elapsed any remaining unsent data may be discarded.** func (c *TCPConn) SetNoDelay(noDelay bool) error
SetNoDelay controls whether the operating system should delay packet transmission in hopes of sending fewer packets (Nagle's algorithm). The default is true (no delay), meaning that data is sent as soon as possible after a Write.

func (c *TCPConn) SetReadBuffer(bytes int) error

SetReadBuffer sets the size of the operating system's receive buffer associated with the connection.

func (c *TCPConn) SetReadDeadline(t time.Time) error

SetReadDeadline implements the Conn SetReadDeadline method.

func (c *TCPConn) SetWriteBuffer(bytes int) error

SetWriteBuffer sets the size of the operating system's transmit buffer associated with the connection.

func (c *TCPConn) SetWriteDeadline(t time.Time) error

SetWriteDeadline implements the Conn SetWriteDeadline method.

func (c *TCPConn) SyscallConn() (syscall.RawConn, error)

SyscallConn returns a raw network connection. This implements the syscall.Conn interface.

func (c *TCPConn) Write(b []byte) (int, error)

Write implements the Conn Write method.

type TCPListener

func ListenTCP(network string, laddr *TCPAddr) (*TCPListener, error)

ListenTCP acts like Listen for TCP networks.

The network must be a TCP network name; see func Dial for details.

If the IP field of laddr is nil or an unspecified IP address, ListenTCP listens on all available unicast and anycast IP addresses of the local system. If the Port field of laddr is 0, a port number is automatically chosen.

func (l *TCPListener) Accept() (Conn, error)

Accept implements the Accept method in the Listener interface; it waits for the next call and returns a generic Conn.

func (l *TCPListener) AcceptTCP() (*TCPConn, error)

AcceptTCP accepts the next incoming call and returns the new connection.

func (l *TCPListener) Addr() Addr

Addr returns the listener's network address, a *TCPAddr. The Addr returned is shared by all invocations of Addr, so do not modify it.

func (l *TCPListener) Close() error

Close stops listening on the TCP address. Already Accepted connections are not closed.

func (l *TCPListener) File() (f *os.File, err error)

File returns a copy of the underlying os.File, set to blocking mode. It is the caller's responsibility to close f when finished. Closing l does not affect f, and closing f does not affect l.

The returned os.File's file descriptor is different from the connection's. Attempting to change properties of the original using this duplicate may or may not have the desired effect.

func (l *TCPListener) SetDeadline(t time.Time) error

SetDeadline sets the deadline associated with the listener. A zero time value disables the deadline.

type UDPAddr

func ResolveUDPAddr(network, address string) (*UDPAddr, error)

func (a *UDPAddr) Network() string

func (a *UDPAddr) String() string

type UDPConn

func DialUDP(network string, laddr, raddr *UDPAddr) (*UDPConn, error)

func ListenMulticastUDP(network string, ifi *Interface, gaddr *UDPAddr) (*UDPConn, error)

func ListenUDP(network string, laddr *UDPAddr) (*UDPConn, error)

func (c *UDPConn) Close() error

func (c *UDPConn) File() (f *os.File, err error)

func (c *UDPConn) LocalAddr() Addr

func (c *UDPConn) Read(b []byte) (int, error)

func (c *UDPConn) ReadFrom(b []byte) (int, Addr, error)

func (c *UDPConn) ReadFromUDP(b []byte) (int, *UDPAddr, error)

func (c *UDPConn) ReadMsgUDP(b, oob []byte) (n, oobn, flags int, addr *UDPAddr, err error)

func (c *UDPConn) RemoteAddr() Addr

func (c *UDPConn) SetDeadline(t time.Time) error

func (c *UDPConn) SetReadBuffer(bytes int) error

func (c *UDPConn) SetReadDeadline(t time.Time) error

func (c *UDPConn) SetWriteBuffer(bytes int) error

func (c *UDPConn) SetWriteDeadline(t time.Time) error

func (c *UDPConn) SyscallConn() (syscall.RawConn, error)

func (c *UDPConn) Write(b []byte) (int, error)

func (c *UDPConn) WriteMsgUDP(b, oob []byte, addr *UDPAddr) (n, oobn int, err error)

func (c *UDPConn) WriteTo(b []byte, addr Addr) (int, error)

func (c *UDPConn) WriteToUDP(b []byte, addr *UDPAddr) (int, error)

type UnixAddr

func ResolveUnixAddr(network, address string) (*UnixAddr, error)

func (a *UnixAddr) Network() string

func (a *UnixAddr) String() string

type UnixConn

func DialUnix(network string, laddr, raddr *UnixAddr) (*UnixConn, error)

func ListenUnixgram(network string, laddr *UnixAddr) (*UnixConn, error)

func (c *UnixConn) Close() error

func (c *UnixConn) CloseRead() error

func (c *UnixConn) CloseWrite() error

func (c *UnixConn) File() (f *os.File, err error)

func (c *UnixConn) LocalAddr() Addr

func (c *UnixConn) Read(b []byte) (int, error)

func (c *UnixConn) ReadFrom(b []byte) (int, Addr, error)

func (c *UnixConn) ReadFromUnix(b []byte) (int, *UnixAddr, error)

func (c *UnixConn) ReadMsgUnix(b, oob []byte) (n, oobn, flags int, addr *UnixAddr, err error)

func (c *UnixConn) RemoteAddr() Addr

func (c *UnixConn) SetDeadline(t time.Time) error

func (c *UnixConn) SetReadBuffer(bytes int) error

func (c *UnixConn) SetReadDeadline(t time.Time) error

func (c *UnixConn) SetWriteBuffer(bytes int) error

func (c *UnixConn) SetWriteDeadline(t time.Time) error

func (c *UnixConn) SyscallConn() (syscall.RawConn, error)

func (c *UnixConn) Write(b []byte) (int, error)

func (c *UnixConn) WriteMsgUnix(b, oob []byte, addr *UnixAddr) (n, oobn int, err error)

func (c *UnixConn) WriteTo(b []byte, addr Addr) (int, error)

func (c *UnixConn) WriteToUnix(b []byte, addr *UnixAddr) (int, error)

type UnixListener

func ListenUnix(network string, laddr *UnixAddr) (*UnixListener, error)

func (l *UnixListener) Accept() (Conn, error)

func (l *UnixListener) AcceptUnix() (*UnixConn, error)

func (l *UnixListener) Addr() Addr

func (l *UnixListener) Close() error

func (l *UnixListener) File() (f *os.File, err error)

func (l *UnixListener) SetDeadline(t time.Time) error

func (l *UnixListener) SetUnlinkOnClose(unlink bool)

type UnknownNetworkError

func (e UnknownNetworkError) Error() string

func (e UnknownNetworkError) Temporary() bool

func (e UnknownNetworkError) Timeout() bool