Documentation ¶
Index ¶
- Constants
- func AddAddressParser(addressParser AddressParser)
- func NewDialerWithLocalBinding(addressType string, timeout time.Duration, localBinding string) (*net.Dialer, error)
- func ResolveInterface(toResolve string) (*net.Interface, error)
- func ResolveLocalBinding(localBinding string) (net.IP, error)
- type Address
- type AddressParser
- type Configuration
- type Conn
- type ConnectionDetail
Constants ¶
View Source
const ( DefaultWsWriteTimeout = time.Second * 10 DefaultWsReadTimeout = time.Second * 5 DefaultWsIdleTimeout = time.Second * 120 DefaultWsPongTimeout = time.Second * 60 DefaultWsPingInterval = (DefaultWsPongTimeout * 9) / 10 DefaultWsHandshakeTimeout = time.Second * 10 DefaultWsReadBufferSize = 4096 DefaultWsWriteBufferSize = 4096 DefaultWsEnableCompression = true )
Variables ¶
This section is empty.
Functions ¶
func AddAddressParser ¶
func AddAddressParser(addressParser AddressParser)
AddAddressParser adds an AddressParser to the globally-configured address parsers.
func NewDialerWithLocalBinding ¶
func NewDialerWithLocalBinding(addressType string, timeout time.Duration, localBinding string) (*net.Dialer, error)
NewDialerWithLocalBinding creates a dialer and sets the local ip used for dialing
func ResolveInterface ¶
Resolve a network interface by name or IP address
Types ¶
type Address ¶
type Address interface { Dial(name string, i *identity.TokenId, timeout time.Duration, tcfg Configuration) (Conn, error) DialWithLocalBinding(name string, binding string, i *identity.TokenId, timeout time.Duration, tcfg Configuration) (Conn, error) Listen(name string, i *identity.TokenId, acceptF func(Conn), tcfg Configuration) (io.Closer, error) MustListen(name string, i *identity.TokenId, acceptF func(Conn), tcfg Configuration) io.Closer String() string Type() string }
Address implements the functionality provided by a generic "address".
func ParseAddress ¶
ParseAddress uses the globally-configured AddressParser instances to parse an address.
type AddressParser ¶
AddressParser implements the functionality provided by an "address parser".
type Configuration ¶
type Configuration map[interface{}]interface{}
type Conn ¶
type Conn interface { Detail() *ConnectionDetail PeerCertificates() []*x509.Certificate net.Conn }
Conn represents an abstract connection
type ConnectionDetail ¶
func (*ConnectionDetail) String ¶
func (cd *ConnectionDetail) String() string
Click to show internal directories.
Click to hide internal directories.