client

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWebSocketClient

func NewWebSocketClient(args ArgsWebSocketClient) (*client, error)

NewWebSocketClient will create a new instance of WebSocket client

Types

type ArgsWebSocketClient

type ArgsWebSocketClient struct {
	RetryDurationInSeconds     int
	AckTimeoutInSeconds        int
	WithAcknowledge            bool
	BlockingAckOnError         bool
	DropMessagesIfNoConnection bool
	URL                        string
	PayloadConverter           websocket.PayloadConverter
	Log                        core.Logger
	PayloadVersion             uint32
}

ArgsWebSocketClient holds the arguments needed for creating a client

type Transceiver

type Transceiver interface {
	Send(payload []byte, topic string, connection websocket.WSConClient) error
	SetPayloadHandler(handler websocket.PayloadHandler) error
	Listen(connection websocket.WSConClient) (closed bool)
	Close() error
}

Transceiver defines what a WebSocket transceiver should be able to do

Jump to

Keyboard shortcuts

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