Versions in this module Expand all Collapse all v0 v0.0.1 Aug 7, 2026 Changes in this version + const KeepAliveTimeout + const WriteInterval + func EncodePayLoad(payload Payload) ([]byte, error) + type BytesPayload struct + func (b *BytesPayload) Ack(data []byte) Payload + func (b *BytesPayload) Bytes() []byte + func (b *BytesPayload) GetPkgIdx() uint64 + func (b *BytesPayload) SetPkgIdx(i uint64) + func (b *BytesPayload) Size() uint32 + func (b *BytesPayload) Type() int8 + type Client struct + Address string + Type string + func NewLinkClient(clientID, address string, linkEventListener LinkEventListener) *Client + func (c *Client) GetLink() *Link + func (c *Client) OnStatus(link *Link, statusType StatusType) + func (c *Client) OnStream(link *Link, payload Payload, dir StreamDir) + func (c *Client) Start() error + type Link struct + func (l *Link) ASend(payload Payload, handler func(Payload)) (err error) + func (l *Link) AddDataHandler(key string, handler *LinkDataHandler) + func (l *Link) Close() + func (l *Link) GetClientID() string + func (l *Link) GetStatus() StatusType + func (l *Link) RemoveDataHandler(key string) + func (l *Link) SSend(payload Payload, timeout time.Duration) (Payload, error) + func (l *Link) SetClientID(clientID string) + type LinkDataHandler struct + type LinkEventListener interface + OnStatus func(*Link, StatusType) + OnStream func(*Link, Payload, StreamDir) + type Listener struct + Address string + Type string + func NewLinkListener(address string, linkEventListener LinkEventListener) *Listener + func (l *Listener) GetLink(ID string) *Link + func (l *Listener) OnStatus(link *Link, statusType StatusType) + func (l *Listener) OnStream(link *Link, payload Payload, dir StreamDir) + func (l *Listener) Start() error + func (l *Listener) Stop() error + type Payload interface + Ack func(data []byte) Payload + Bytes func() []byte + GetPkgIdx func() uint64 + SetPkgIdx func(i uint64) + Size func() uint32 + Type func() int8 + func DecodePayLoad(data []byte) (Payload, error) + func NewBytesPayload(t int8, data []byte) (Payload, error) + type StatusType byte + const StatusClosed + const StatusError + const StatusInit + const StatusReady + func (s StatusType) String() string + type StreamDir byte + const StreamIncoming + const StreamOutgoing + func (dir StreamDir) String() string