Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // TCPAddresses is a slice of the configured host:port pairs. TCPAddresses []TCPAddress }
Config is an internal struct meant to implement the interface in experimental/sock/Config.
func (*Config) BuildTCPListeners ¶
func (c *Config) BuildTCPListeners() (tcpListeners []*net.TCPListener, err error)
BuildTCPListeners build listeners from the current configuration.
func (*Config) WithTCPListener ¶
WithTCPListener implements the method of the same name in experimental/sock/Config.
However, to avoid cyclic dependencies, this is returning the *Config in this scope. The interface is implemented in experimental/sock/Config via delegation.
type ConfigKey ¶
type ConfigKey struct{}
ConfigKey is a context.Context Value key. Its associated value should be a Config.
type TCPAddress ¶
type TCPAddress struct { // Host is the host name for this listener. Host string // Port is the port number for this listener. Port int }
TCPAddress is a host:port pair to pre-open.
func (TCPAddress) String ¶
func (t TCPAddress) String() string
type TCPConn ¶
type TCPConn interface { sys.File // Recvfrom only supports the flag sysfs.MSG_PEEK // TODO: document this like sys.File with known sys.Errno Recvfrom(p []byte, flags int) (n int, errno sys.Errno) // TODO: document this like sys.File with known sys.Errno Shutdown(how int) sys.Errno }
TCPConn is a pseudo-file representing a TCP connection.
Click to show internal directories.
Click to hide internal directories.