Documentation
¶
Overview ¶
Package simple contains simplistic implementation for the wire.Dialer and wire.Listener interfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dialer ¶
Dialer is a simple lookup-table based dialer that can dial known peers. New peer addresses can be added via Register().
func NewNetDialer ¶
NewNetDialer creates a new dialer with a preset default timeout for dial attempts. Leaving the timeout as 0 will result in no timeouts. Standard OS timeouts may still apply even when no timeout is selected. The network string controls the type of connection that the dialer can dial.
func NewTCPDialer ¶
NewTCPDialer is a short-hand version of NewNetDialer for creating TCP dialers.
func NewUnixDialer ¶
NewUnixDialer is a short-hand version of NewNetDialer for creating Unix dialers.
type Listener ¶
Listener is a TCP Listener.
func NewNetListener ¶
NewNetListener creates a listener reachable under the requested address.
func NewTCPListener ¶
NewTCPListener is a short-hand version of NewNetListener for TCP listeners.
func NewUnixListener ¶
NewUnixListener is a short-hand version of NewNetListener for Unix listeners.