Documentation ¶
Overview ¶
Package udp provides a simple package that implements a udp protocol transmission for the octo.TranmissionProtocol interface. Which allows a uniform response cycle with a udp based connection either for single/multicast connections.
Index ¶
- type Client
- type Server
- func (s *Server) Close() error
- func (s *Server) Contact() octo.Contact
- func (s *Server) Credential() octo.AuthCredential
- func (s *Server) IsRunning() bool
- func (s *Server) Listen(system server.System) error
- func (s *Server) Register(tm server.StateHandlerType, hmi interface{})
- func (s *Server) Wait()
- type ServerAttr
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines the structure which communicates with other udp connections.
func (*Client) Close ¶
Close usually closes the connection patterning to the giving client, but in udp the server connection handles the response, so operation happens here.
type Server ¶
type Server struct { Attr ServerAttr // contains filtered or unexported fields }
Server defines a struct for a managing the internals of a UDP server.
func New ¶
func New(instrument octo.Instrumentation, attr ServerAttr) *Server
New returns a new instance of the UDP server.
func (*Server) Credential ¶
func (s *Server) Credential() octo.AuthCredential
Credential returns the Credential related to the giving server.
func (*Server) Register ¶
func (s *Server) Register(tm server.StateHandlerType, hmi interface{})
Register registers the handler for a given handler.
type ServerAttr ¶
type ServerAttr struct { Addr string Authenticate bool Version Version Credential octo.AuthCredential MulticastInterface *net.Interface }
ServerAttr defines the giving attributes that determines how a UDP server intializes and behaves.