Setup
Basic usage
Exposing methods
Basic method
With capability
Async method
Streaming progress
A handler can emit progress chunks before returning its final result, viaemitProgress on the RPC context:
Emitting events
Managing clients
Identity persistence
The host identity is persisted automatically understorageDir (default ./.crosslink-data/<appId>), in the strongest available secret store (OS keychain, Electron safeStorage, or an encrypted file), plus a paired-devices record. Pass storageDir in createCrosslinkServer() to override the location.
Environment variables
Graceful shutdown
Handling server events
CrosslinkServer extends Node’s EventEmitter. Use typedOn() for the typed events it emits: