Documentation ¶
Overview ¶
Package transport provides a context wrapper and error handling around a UDP connection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transport ¶
type Transport interface { // Address returns the IP:port of the remote device. This will always have // the port, even if the address provided was missing it (we default to // 623). Address() net.Addr // Send encapsulates the provided data in a UDP packet and sends it to the // BMC's address. It then blocks until a packet is received, and returns the // data it contains. If the context expires before all of this is performed, // or there is a network error, the returned slice will be nil and the error // will be returned. Send(context.Context, []byte) ([]byte, error) // Close cleanly shuts down the underlying connection, returning any error // that occurs. It is envisaged that this call is deferred as soon as the // transport is successfully created. Close() error }
Transport defines an interface capable of sending and receiving data to and from a device. It logically represents a UDP socket and receive buffer. Unless specified otherwise, access must be serialised.
Click to show internal directories.
Click to hide internal directories.