publishL2capChannel method

Future<(int, Stream<L2CapChannel>)> publishL2capChannel()

Publishes an L2CAP channel and returns the corresponding PSM and stream to await new channels.

Note: although this returns a stream of channels, iOS centrals are not capable of connecting multiple times to the same PSM, so you may need to publish multiple PSMs for iOS devices unless you multiplex over a single channel.

Implementation

Future<(int, Stream<L2CapChannel>)> publishL2capChannel() => _BlePlatform.instance.peripheralManagerPublishChannel();