server

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWebSocketServer

func NewWebSocketServer(args ArgsWebSocketServer) (*server, error)

NewWebSocketServer will create a new instance of server

Types

type ArgsWebSocketServer

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

ArgsWebSocketServer holds all the components needed to create a server

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