router

package
v0.0.0-...-ca3d699 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MeshRouter

type MeshRouter struct {
	// contains filtered or unexported fields
}

MeshRouter is the main struct for the packet router.

func NewMeshRouter

func NewMeshRouter(ctx context.Context, bufferSize int, radio lora.Radio) *MeshRouter

NewMeshRouter creates a new MeshRouter with initialized channels and context.

func (*MeshRouter) Close

func (r *MeshRouter) Close()

Close cleans up resources used by MeshRouter, now respecting the cancellation context.

func (*MeshRouter) ReceivePacket

func (r *MeshRouter) ReceivePacket() <-chan *meshtastic.MeshPacket

ReceivePacket provides a channel on which consumers can receive incoming MeshPackets, respecting context cancellation.

func (*MeshRouter) SendPacket

func (r *MeshRouter) SendPacket(packet *meshtastic.MeshPacket)

SendPacket allows consumers to send a MeshPacket to be transmitted, respecting context cancellation.

func (*MeshRouter) Start

func (r *MeshRouter) Start()

Start starts the packet routing process with context handling for graceful shutdown.

Jump to

Keyboard shortcuts

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