screenhub

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) Connected added in v0.4.0

func (h *Hub) Connected() bool

Connected reports the last observed authenticated capability exchange. An idle network failure becomes observable on the next I/O.

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