Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
type Connection interface {
// ReadMessage reads a binary message from the connection.
ReadMessage() ([]byte, error)
// WriteMessage writes binary data to the connection.
WriteMessage(data []byte) error
// Close gracefully closes the connection.
Close() error
// IsValid returns true if the connection is established and usable.
IsValid() bool
// IsUnexpectedCloseError returns true if the error represents an unexpected connection close.
IsUnexpectedCloseError(err error) bool
}
Connection abstracts a network connection for reading/writing binary messages.
type NewConnectFunc ¶
type NewConnectFunc func() (Connection, error)
NewConnectFunc creates a Connection
Click to show internal directories.
Click to hide internal directories.