transport

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package transport is the Matter UDP message layer. It listens on the operational port, runs PASE on the unsecured session, decrypts the PASE Interaction Model traffic, then after AddNOC runs CASE on the operational network and decrypts the operational session too.

Index

Constants

View Source
const MatterPort = 5540

MatterPort is the default Matter operational/commissioning UDP port.

Variables

This section is empty.

Functions

This section is empty.

Types

type OperationalAdvertiser

type OperationalAdvertiser interface {
	AdvertiseOperational(compressedFabricID []byte, nodeID uint64) error
	StopOperational() error
}

OperationalAdvertiser starts operational (_matter._tcp) mDNS after AddNOC and reverts to commissionable on decommission (RemoveFabric).

type Server

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

Server reads datagrams and drives PASE → encrypted session → CASE.

func NewServer

func NewServer(port int, log *logger.Logger, paseResponder *pase.Responder, imHandler *im.Handler, opAdv OperationalAdvertiser) *Server

func (*Server) PushReports

func (s *Server) PushReports()

PushReports sends an immediate subscription report on every active subscription — used to reflect an external (HA) state change to the commissioner instantly, instead of waiting for the keepalive tick. Each report re-reads the live model, so it carries the new value. Safe to call from any goroutine (atomic counter + concurrency-safe socket write).

func (*Server) Reload

func (s *Server) Reload(fn func())

Reload runs fn on the read-loop goroutine, serialized with packet handling — used for dynamic model changes (SetBridge + PushReports) so they don't race with request serving.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run listens until ctx is cancelled.

Jump to

Keyboard shortcuts

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