websocket

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: GPL-3.0 Imports: 5 Imported by: 4 modules, 10 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWebSocketPayloadConverter

func NewWebSocketPayloadConverter(marshaller marshal.Marshalizer) (*webSocketsPayloadConverter, error)

NewWebSocketPayloadConverter returns a new instance of websocketPayloadParser

Types

type HttpServerHandler

type HttpServerHandler interface {
	ListenAndServe() error
	Shutdown(ctx context.Context) error
}

HttpServerHandler defines the minimum behaviour of a http server

type PayloadConverter

type PayloadConverter interface {
	ExtractWsMessage(payload []byte) (*data.WsMessage, error)
	ConstructPayload(wsMessage *data.WsMessage) ([]byte, error)
	IsInterfaceNil() bool
}

PayloadConverter defines what a websocket payload converter should do

type PayloadHandler

type PayloadHandler interface {
	ProcessPayload(payload []byte, topic string, version uint32) error
	Close() error
	IsInterfaceNil() bool
}

PayloadHandler defines what a payload handler should be able to do

func NewNilPayloadHandler

func NewNilPayloadHandler() PayloadHandler

NewNilPayloadHandler will create a new instance of nilPayloadHandler

type WSConClient

type WSConClient interface {
	io.Closer
	OpenConnection(url string) error
	IsOpen() bool
	WriteMessage(messageType int, data []byte) error
	ReadMessage() (int, []byte, error)
	GetID() string
	IsInterfaceNil() bool
}

WSConClient defines what a web-sockets connection client should be able to do

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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