Documentation ¶
Overview ¶
Package network defines abstractions used for handling network connections.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptGreeting ¶
AcceptGreeting accepts a greeting and returns the information it learned from it.
Types ¶
type Connection ¶
type Connection interface { Read([]byte) (int, error) Write([]byte) (int, error) Flush() error Close() error Interrupt() error RemoteAddr() net.Addr }
Connection represents a network connection between two processes.
type Server ¶
type Server interface { // Dial connects to a committee member identified by pid and returns the resulting connection or an error. Dial(pid uint16) (Connection, error) // Listen for an incoming connection for the given time. Returns the connection if successful, otherwise an error. Listen() (Connection, error) // Stop stops this Server and cancels all ongoing executions of Dial and Listen. Stop() }
Server establishes network connections.
Directories ¶
Path | Synopsis |
---|---|
Package persistent implements "virtual connections", many of which utilize the same underlying TCP link.
|
Package persistent implements "virtual connections", many of which utilize the same underlying TCP link. |
Package tcp implements network.Connections that wrap around TCP connections.
|
Package tcp implements network.Connections that wrap around TCP connections. |
Package udp wraps UDP packets in network.Connections.
|
Package udp wraps UDP packets in network.Connections. |
Click to show internal directories.
Click to hide internal directories.