Documentation ¶
Index ¶
- func OnPumpEndStub()
- func OnReceiveStub(m *posbus.Message)
- type Connection
- func (c *Connection) Close()
- func (c *Connection) EnableWriting()
- func (c *Connection) Send(m *websocket.PreparedMessage)
- func (c *Connection) SendDirectly(m *websocket.PreparedMessage) error
- func (c *Connection) SetPumpEndCallback(f func())
- func (c *Connection) SetReceiveCallback(f func(m *posbus.Message))
- func (c *Connection) StartReadPump()
- func (c *Connection) StartWritePump()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnPumpEndStub ¶
func OnPumpEndStub()
func OnReceiveStub ¶
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()
Click to show internal directories.
Click to hide internal directories.