Documentation ¶
Index ¶
- Constants
- type WebsocketConnection
- func (w *WebsocketConnection) CloseDataConnection(closeCode int, reason string)
- func (w *WebsocketConnection) InitDataProcessing(dataProcessing api.WebsocketDataReaderInterface)
- func (w *WebsocketConnection) IsDataConnectionClosed() (bool, error)
- func (w *WebsocketConnection) WriteMessageToWebsocketConnection(message []byte) error
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
Click to show internal directories.
Click to hide internal directories.