Versions in this module Expand all Collapse all v1 v1.0.6 Jan 5, 2024 v1.0.5 Jan 4, 2024 v1.0.4 Jan 4, 2024 v1.0.3 Jan 4, 2024 v1.0.2 Dec 11, 2023 v1.0.1 Dec 11, 2023 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 + var DefaultClientACK = &Acknowledge + var DefaultServerACK = &Acknowledge + 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 NewConn(c *net.TCPConn, ack *Acknowledge) (*Conn, error) + func (c *Conn) Close() (err error) + func (c *Conn) Handshake(ctx context.Context, endpoint string) 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 Dialer struct + ClientACK *Acknowledge + Dialer *net.Dialer + func (d *Dialer) Dial(ctx context.Context, endpoint string) (*Conn, error) + 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 + func (e *Error) Unwrap() error + 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)