Skip to main content

passnote_lan 1.1.0 copy "passnote_lan: ^1.1.0" to clipboard
passnote_lan: ^1.1.0 copied to clipboard

Transports for Passnote: WebSocket (web-safe, with a reference relay) and mDNS LAN discovery (native).

example/passnote_lan_example.dart

// Constructs the two transports. A transport is handed to the Passnote
// builder (`.transport(...)`), which starts and stops it; this example only
// shows the configuration surface.
import 'package:passnote_lan/discovery.dart';

void main() {
  // Zero-configuration discovery and sync on the local network (native only).
  final lan = LanTransport();

  // Explicit addresses, for browsers and peers beyond mDNS reach. The
  // addresses point at peers listening with `listenPort:`, or at a relay
  // (`dart run passnote_lan:relay`).
  final ws = WebSocketTransport(
    connectTo: [Uri.parse('wss://relay.example.com')],
  );

  print('transports ready: $lan, $ws');
}
0
likes
0
points
238
downloads

Publisher

verified publishernodsoftware.net

Weekly Downloads

Transports for Passnote: WebSocket (web-safe, with a reference relay) and mDNS LAN discovery (native).

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

mdns_dart, passnote, web

More

Packages that depend on passnote_lan