socket

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnPumpEndStub

func OnPumpEndStub()

func OnReceiveStub

func OnReceiveStub(m *posbus.Message)

Types

type Connection

type Connection struct {
	OnReceive func(m *posbus.Message)
	OnPumpEnd func()
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(conn *websocket.Conn) *Connection

func (*Connection) Close

func (c *Connection) Close()

func (*Connection) EnableWriting

func (c *Connection) EnableWriting()

func (*Connection) Send

func (c *Connection) Send(m *websocket.PreparedMessage)

func (*Connection) SendDirectly

func (c *Connection) SendDirectly(m *websocket.PreparedMessage) error

func (*Connection) SetPumpEndCallback

func (c *Connection) SetPumpEndCallback(f func())

func (*Connection) SetReceiveCallback

func (c *Connection) SetReceiveCallback(f func(m *posbus.Message))

func (*Connection) StartReadPump

func (c *Connection) StartReadPump()

func (*Connection) StartWritePump

func (c *Connection) StartWritePump()

Jump to

Keyboard shortcuts

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