prototcp

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package prototcp implements the TCPROS protocol.

Index

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 NewConn added in v1.1.0

func NewConn(rw io.ReadWriter) *Conn

NewConn allocates a Conn.

func (*Conn) ReadHeaderRaw

func (c *Conn) ReadHeaderRaw() (protocommon.HeaderRaw, error)

ReadHeaderRaw reads an HeaderRaw.

func (*Conn) ReadMessage

func (c *Conn) ReadMessage(msg interface{}) error

ReadMessage reads a message.

func (*Conn) ReadServiceResponse

func (c *Conn) ReadServiceResponse(msg interface{}) (bool, error)

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

func (c *Conn) WriteMessage(msg interface{}) error

WriteMessage writes a message.

func (*Conn) WriteServiceResponse

func (c *Conn) WriteServiceResponse(state bool, res interface{}) error

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

type HeaderServiceClient struct {
	Callerid   string
	Md5sum     string
	Service    string
	Persistent int
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL