ws

package
v0.0.0-...-94ea245 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// SHIP 9.2: Set maximum fragment length to 1024 bytes
	MaxMessageSize = 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type WebsocketConnection

type WebsocketConnection struct {
	// contains filtered or unexported fields
}

Handling of the actual websocket connection to a remote device

func NewWebsocketConnection

func NewWebsocketConnection(conn *websocket.Conn, remoteSki string) *WebsocketConnection

create a new websocket based shipDataProcessing implementation

func (*WebsocketConnection) CloseDataConnection

func (w *WebsocketConnection) CloseDataConnection(closeCode int, reason string)

shutdown the connection and all internals

func (*WebsocketConnection) InitDataProcessing

func (w *WebsocketConnection) InitDataProcessing(dataProcessing api.WebsocketDataReaderInterface)

func (*WebsocketConnection) IsDataConnectionClosed

func (w *WebsocketConnection) IsDataConnectionClosed() (bool, error)

return if the connection is closed

func (*WebsocketConnection) WriteMessageToWebsocketConnection

func (w *WebsocketConnection) WriteMessageToWebsocketConnection(message []byte) error

write a message to the websocket connection

Jump to

Keyboard shortcuts

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