Documentation
¶
Overview ¶
Package prototcp implements the TCPROS protocol.
Index ¶
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) NetConn() net.Conn
- func (c *Conn) ReadHeaderRaw() (protocommon.HeaderRaw, error)
- func (c *Conn) ReadMessage(msg interface{}, timeout bool) error
- func (c *Conn) ReadServiceResponse(msg interface{}) (bool, error)
- func (c *Conn) WriteHeader(header protocommon.Header) error
- func (c *Conn) WriteMessage(msg interface{}) error
- func (c *Conn) WriteServiceResponse(state bool, res interface{}) error
- type HeaderError
- type HeaderPublisher
- type HeaderServiceClient
- type HeaderServiceProvider
- type HeaderSubscriber
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a TCPROS connection.
func NewClientContext ¶
NewClientContext connects to a TCPROS server and returns a Conn. It allows to set a context that can be used to terminate the function.
func (*Conn) ReadHeaderRaw ¶
func (c *Conn) ReadHeaderRaw() (protocommon.HeaderRaw, error)
ReadHeaderRaw reads an HeaderRaw.
func (*Conn) ReadMessage ¶
ReadMessage reads a message.
func (*Conn) ReadServiceResponse ¶
ReadServiceResponse reads the response of a service request.
func (*Conn) WriteHeader ¶
func (c *Conn) WriteHeader(header protocommon.Header) error
WriteHeader writes an header.
func (*Conn) WriteMessage ¶
WriteMessage writes a message.
func (*Conn) WriteServiceResponse ¶
WriteServiceResponse writes the response of a service request.
type HeaderError ¶
type HeaderError struct {
Error string
}
HeaderError is the header returned in case of errors.
type HeaderPublisher ¶
type HeaderPublisher struct {
Topic string
Type string
Md5sum string
Callerid string
Latching int
MessageDefinition string
}
HeaderPublisher is a publisher header.
type HeaderServiceClient ¶
HeaderServiceClient is a service client header.
type HeaderServiceProvider ¶
type HeaderServiceProvider struct {
Callerid string
Md5sum string
RequestType string
ResponseType string
Type string
}
HeaderServiceProvider is a service provider event.
type HeaderSubscriber ¶
type HeaderSubscriber struct {
Callerid string
Topic string
Type string
Md5sum string
MessageDefinition string
TcpNodelay int //nolint:revive
}
HeaderSubscriber is a subscriber header.