screenhub

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package screenhub accepts bounded EPN2 connections for one enrolled display. One ScreenPump owns all EPS2 client state; network workers only authenticate and offer peers. Reconciliation never repeats a physical refresh.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCapacity = errors.New("screen handshake capacity reached")
	ErrProfile  = errors.New("screen identity or physical profile differs from configuration")
	ErrCooldown = errors.New("screen physical refresh cooldown has not elapsed")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	ID             securetransport.DeviceID
	Key            securetransport.Key
	Size           display.Size
	Profile        uint32
	ProfileVersion uint16
}

type Hub

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

func New

func New(config Config) (*Hub, error)

func (*Hub) Changed

func (h *Hub) Changed() <-chan struct{}

func (*Hub) Close

func (h *Hub) Close() error

func (*Hub) ConfigurePartial

func (h *Hub) ConfigurePartial(policy refreshpolicy.Policy) error

func (*Hub) ConfigureRefresh

func (h *Hub) ConfigureRefresh(policy refreshpolicy.Policy) error

func (*Hub) Offer

func (h *Hub) Offer(ctx context.Context, socket screenpeer.Socket) error

Offer authenticates synchronously, for transports that already own acceptance. On failure the socket is closed. Success transfers ownership to the hub.

func (*Hub) ResetSession

func (h *Hub) ResetSession()

ResetSession requires the caller to have invalidated its pixel baseline and resolved any retained cycle first. It cannot itself resend or confirm content.

func (*Hub) Send

func (h *Hub) Send(ctx context.Context, frame display.Frame) error

func (*Hub) SendRegion

func (h *Hub) SendRegion(ctx context.Context, plan screendelivery.RegionPlan, options refreshpolicy.Options) error

func (*Hub) SendWithOptions

func (h *Hub) SendWithOptions(ctx context.Context, frame display.Frame, options refreshpolicy.Options) error

func (*Hub) Serve

func (h *Hub) Serve(ctx context.Context, listener net.Listener) error

Serve owns the listener. It creates at most four concurrent handshake workers; closing its context closes every socket and joins those workers.

func (*Hub) WaitReady

func (h *Hub) WaitReady(ctx context.Context) (screendelivery.Readiness, error)

Jump to

Keyboard shortcuts

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