startAdvertising method

  1. @override
Future<void> startAdvertising(
  1. String token,
  2. Uint8List identity
)
override

Serves the libp2p GATT service with identity (the local peer ID bytes) in its identity characteristic, and advertises token.

A central that subscribes to TX opens a link: it arrives on incoming.

Implementation

@override
Future<void> startAdvertising(String token, Uint8List identity) async {
  _token = token;
  _identity = identity;
  _advertising = true;
  scheduleMicrotask(() => _network._announce(this));
}