Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MulticastReader ¶
type MulticastReader struct { ErrChan <-chan error // contains filtered or unexported fields }
MulticastReader implements NetReader for multicast UDP communication
func NewMulticastReader ¶
func NewMulticastReader(addr string) (*MulticastReader, error)
NewMulticastReader creates a new net struct used for receiving from the given address (hostname:port)
func (*MulticastReader) ReadAddr ¶
func (n *MulticastReader) ReadAddr() string
func (*MulticastReader) StartReceiving ¶
func (n *MulticastReader) StartReceiving(tag string) (<-chan interface{}, error)
StartReceiving starts listening on the Net, and returns a channel which will yield messages when they arrive.
func (*MulticastReader) StopReceiving ¶
func (n *MulticastReader) StopReceiving()
StopReceiving closes channels and stops the receive loop
type NetReader ¶
type NetReader interface { StartReceiving(string) (<-chan interface{}, error) StopReceiving() ReadAddr() string }
NetReader binds to and continuously reads from the given host and port
type UDPWriter ¶
type UDPWriter struct {
// contains filtered or unexported fields
}
UDPWriter contains methods to write to a udp address (host:port)
func NewUDPWriter ¶
NewUDPWriter creates a new writer that writes to the given address (host:port)
type UniReader ¶
type UniReader struct { ErrChan <-chan error // contains filtered or unexported fields }
UniReader implements NetReader for unicast UDP communication
func NewUniReader ¶
NewUniReader creates a new net struct used for receiving from the given address (hostname:port)
func (*UniReader) StartReceiving ¶
StartReceiving starts listening on the Net, and returns a channel which will yield messages when they arrive.
func (*UniReader) StopReceiving ¶
func (n *UniReader) StopReceiving()
StopReceiving closes channels and stops the receive loop