Versions in this module Expand all Collapse all v1 v1.0.1 Jun 28, 2021 Changes in this version + const ChunkTypeAbort + const ChunkTypeFinal + const ChunkTypeIntermediate + const DefaultMaxChunkCount + const DefaultMaxMessageSize + const DefaultReceiveBufSize + const DefaultSendBufSize + const KB + const MB + const MessageTypeAcknowledge + const MessageTypeError + const MessageTypeHello + const MessageTypeReverseHello + func ResolveEndpoint(endpoint string) (network string, addr *net.TCPAddr, err error) + type Acknowledge struct + MaxChunkCount uint32 + MaxMessageSize uint32 + ReceiveBufSize uint32 + SendBufSize uint32 + Version uint32 + func (a *Acknowledge) Decode(b []byte) (int, error) + func (a *Acknowledge) Encode() ([]byte, error) + type Conn struct + func Dial(ctx context.Context, endpoint string) (*Conn, error) + func (c *Conn) Close() error + func (c *Conn) ID() uint32 + func (c *Conn) MaxChunkCount() uint32 + func (c *Conn) MaxMessageSize() uint32 + func (c *Conn) Receive() ([]byte, error) + func (c *Conn) ReceiveBufSize() uint32 + func (c *Conn) Send(typ string, msg interface{}) error + func (c *Conn) SendBufSize() uint32 + func (c *Conn) SendError(code ua.StatusCode) + type Error struct + ErrorCode uint32 + Reason string + func (e *Error) Decode(b []byte) (int, error) + func (e *Error) Encode() ([]byte, error) + func (e *Error) Error() string + type Header struct + ChunkType byte + MessageSize uint32 + MessageType string + func (h *Header) Decode(b []byte) (int, error) + func (h *Header) Encode() ([]byte, error) + type Hello struct + EndpointURL string + MaxChunkCount uint32 + MaxMessageSize uint32 + ReceiveBufSize uint32 + SendBufSize uint32 + Version uint32 + func (h *Hello) Decode(b []byte) (int, error) + func (h *Hello) Encode() ([]byte, error) + type Listener struct + func Listen(endpoint string, ack *Acknowledge) (*Listener, error) + func (l *Listener) Accept(ctx context.Context) (*Conn, error) + func (l *Listener) Addr() net.Addr + func (l *Listener) Close() error + func (l *Listener) Endpoint() string + type Message struct + Data []byte + func (m *Message) Decode(b []byte) (int, error) + func (m *Message) Encode() ([]byte, error) + type ReverseHello struct + EndpointURL string + ServerURI string + func (r *ReverseHello) Decode(b []byte) (int, error) + func (r *ReverseHello) Encode() ([]byte, error)