relay

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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

func (r *Layer) RegisterAboveLayer(belowLayer layer.Base)

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.

Jump to

Keyboard shortcuts

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