Documentation ¶
Index ¶
- Constants
- type FinishedCb
- type Nexus
- func (c *Nexus) ConsumerFinishedCb()
- func (c *Nexus) IsLayerMessage(message base2.MoneysocketMessage) bool
- func (c *Nexus) OnBinMessage(belowNexus nexus.Nexus, msg []byte)
- func (c *Nexus) OnMessage(belowNexus nexus.Nexus, msg base2.MoneysocketMessage)
- func (c *Nexus) OnPing(consumerNexus nexus.Nexus, milliseconds int)
- func (c *Nexus) SendPing()
- func (c *Nexus) SetOnPing(fn OnPingFn)
- func (c *Nexus) StartHandshake(cb FinishedCb)
- func (c *Nexus) StartPinging()
- func (c *Nexus) StopPinging()
- type OnPingFn
Constants ¶
View Source
const NexusName = "ConsumerNexus"
NexusName is the name of the consumer nexus.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FinishedCb ¶ added in v0.54.0
type FinishedCb func(consumerNexus Nexus)
FinishedCb is a callback for when the Nexus finishes.
type Nexus ¶ added in v0.54.0
Nexus is a consumer nexus to manage websockets as a consumer of the protocol.
func NewConsumerNexus ¶
NewConsumerNexus creates a new consumer nexus.
func (*Nexus) ConsumerFinishedCb ¶ added in v0.54.0
func (c *Nexus) ConsumerFinishedCb()
ConsumerFinishedCb is wether or not the consumer callback is finished.
func (*Nexus) IsLayerMessage ¶ added in v0.54.0
func (c *Nexus) IsLayerMessage(message base2.MoneysocketMessage) bool
IsLayerMessage determines whether or not a message should be processed by this layer.
func (*Nexus) OnBinMessage ¶ added in v0.54.0
OnBinMessage processes a binary message.
func (*Nexus) OnMessage ¶ added in v0.54.0
func (c *Nexus) OnMessage(belowNexus nexus.Nexus, msg base2.MoneysocketMessage)
OnMessage processes a passed message.
func (*Nexus) SendPing ¶ added in v0.54.0
func (c *Nexus) SendPing()
SendPing sends a ping up the nexus chain.
func (*Nexus) StartHandshake ¶ added in v0.54.0
func (c *Nexus) StartHandshake(cb FinishedCb)
StartHandshake starts a handshake/sets a finished callback.
func (*Nexus) StartPinging ¶ added in v0.54.0
func (c *Nexus) StartPinging()
StartPinging on a set interval.
func (*Nexus) StopPinging ¶ added in v0.54.0
func (c *Nexus) StopPinging()
StopPinging stops the consumer from pinging.
Click to show internal directories.
Click to hide internal directories.