Documentation ¶
Index ¶
- type Layer
- func (r *Layer) AnnounceNexus(rendezvousNexus nexusHelper.Nexus)
- func (r *Layer) OnBinMessage(rendezvousNexus nexusHelper.Nexus, msg []byte)
- func (r *Layer) OnMessage(rendezvousNexus nexusHelper.Nexus, msg base.MoneysocketMessage)
- func (r *Layer) RegisterAboveLayer(belowLayer layer.Base)
- func (r *Layer) RevokeNexus(rendezvousNexus nexusHelper.Nexus)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Layer ¶ added in v0.54.0
type Layer struct { layer.BaseLayer // RendezvousLayer is the rendezvous.IncomingRendezvousLayer that hits a peer nexus RendezvousLayer *rendezvous.IncomingRendezvousLayer }
Layer is the relay layer.
func NewRelayLayer ¶
func NewRelayLayer(rendezvousLayer *rendezvous.IncomingRendezvousLayer) *Layer
NewRelayLayer creates the Layer given the rendezvous layer.
func (*Layer) AnnounceNexus ¶ added in v0.54.0
func (r *Layer) AnnounceNexus(rendezvousNexus nexusHelper.Nexus)
AnnounceNexus registers the message handlers for the rendezvousNexus to RelayLayer.
func (*Layer) OnBinMessage ¶ added in v0.54.0
func (r *Layer) OnBinMessage(rendezvousNexus nexusHelper.Nexus, msg []byte)
OnBinMessage takes a binary message and sends it to the peer nexus.
func (*Layer) OnMessage ¶ added in v0.54.0
func (r *Layer) OnMessage(rendezvousNexus nexusHelper.Nexus, msg base.MoneysocketMessage)
OnMessage sends a non-binary message to the peer nexus.
func (*Layer) RegisterAboveLayer ¶ added in v0.54.0
RegisterAboveLayer registers the current nexuses announce/revoke nexuses to the below layer.
func (*Layer) RevokeNexus ¶ added in v0.54.0
func (r *Layer) RevokeNexus(rendezvousNexus nexusHelper.Nexus)
RevokeNexus revokes a nexus from below. This method is simply used to conform to the layer.Base here.
Click to show internal directories.
Click to hide internal directories.