TransferManager class

Class providing high-Level APIs to manage ad hoc networks and network communications.

Constructors

TransferManager(bool _verbose, {Config? config})
Creates a TransferManager object.

Properties

activeAdapterNames Future<HashMap<int, String>>
Actives adapter names as a HashMap representing the adapter name of the specified technology. The key value are integer, where a '0' value represents Wi-Fi and a '1' value Bluetooth Low Energy.
no setter
bluetoothAdapterName Future<String>
Bluetooth adapter name as String.
no setter
config Config
Configuration object (Config), which represents the current configuration.
no setter
directNeighbors List<AdHocDevice>
List of direct neighors of this node (List of AdHocDevice).
no setter
eventStream Stream<Event>
Stream of lower layers ad hoc events represented by Event.
no setter
hashCode int
The hash code for this object.
no setterinherited
open bool
Stance about joining group formation
no getter
ownAddress String
Current label (String) that identifies uniquely the device.
no setter
pairedBluetoothDevices Future<HashMap<String, AdHocDevice>>
Bluetooth paired devices as HashMap of <String, AdHocDevice>.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
wifiAdapterName Future<String>
Wi-Fi adapter name as String.
no setter

Methods

broadcast(Object data) Future<bool>
Broadcasts a message to all directly connected nodes.
broadcastExcept(Object data, AdHocDevice excluded) Future<bool>
Broadcasts a message to all directly connected nodes except the excluded one.
connect(AdHocDevice device, [int? attempts]) Future<void>
Attempts to connect to a remote peer.
createGroup([List<String>? labels]) → void
Creates a secure group.
disconnect(AdHocDevice device) → void
Disconnects the current node from a specific remote node.
disconnectAll() → void
Disconnects the current node from all remote node.
discovery() → void
Performs a discovery process.
enable() → void
Enables the Bluetooth and Wi-Fi adapter.
enableBle(int duration) → void
Enables the Bluetooth adapter.
enableWifi(int duration) → void
Initialises the underlying Wi-Fi data structures.
encryptedBroadcast(Object data) Future<bool>
Broadcasts a message, whose payload is encrypted, to all directly connected nodes.
encryptedBroadcastExcept(Object data, AdHocDevice excluded) Future<bool>
Broadcasts a message, whose payload is encrypted, to all directly connected nodes except the excluded one.
isBluetoothEnabled() bool
Check if Bluetooth is enabled.
isWifiEnabled() bool
Checks if Wi-Fi is enabled.
isWifiGroupOwner() bool
Checks if the current device is the Wi-Fi group owner.
joinGroup([String? label]) → void
Joins an existing secure group.
leaveGroup() → void
Leaves an existing secure group.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeWifiGroup() → void
Removes the current device from its Wi-Fi group.
resetAdapterName(int type) → void
Resets the adapter name of a particular technology adapter.
revoke() → void
Revokes its certificate
sendEncryptedMessageTo(Object data, String destination) → void
Sends a message, whose payload is encrypted, to a remote node.
sendMessageTo(Object data, String destination) → void
Sends a message to a remote node.
sendMessageToGroup(Object data) → void
Sends a confidential message to the secure group members.
stopListening() → void
Stop the listening process of incoming connections.
toString() String
A string representation of this object.
inherited
updateBluetoothAdapterName(String newName) Future<bool>
Updates the name of the Bluetooth adapter.
updateWifiAdapterName(String newName) Future<bool>
Updates the name of the Wi-Fi adapter.

Operators

operator ==(Object other) bool
The equality operator.
inherited