Client class

A Client connects to a Server and can discover Servers listening on the network

Inheritance

Constructors

Client({String name, int multicastPort, String multicastGroupIP, IPVersion ipVersion, DeviceDiscoveryListener deviceDiscoveryListener, ConnectionListener connectionListener})
See Host for explanation on all the common options.

Properties

connected bool
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
interfaceAddresses Future<Iterable<Map<NetworkInterface, Iterable<InternetAddress>>>>
read-only, inherited
interfaces Future<List<NetworkInterface>>
read-only, inherited
ipAddress String
Get the detected IP address
read-only, inherited
ipAddresses Future<Iterable<String>>
Get all IP addresses for all IP versions
read-only, inherited
ipv4Addresses Future<Iterable<String>>
Get all IP addresses for IPv4
read-only, inherited
ipv6Addresses Future<Iterable<String>>
Get all IP addresses for IPv6
read-only, inherited
multicastIPAddress String
Get the multicast Group IP Address
read-only, inherited
multicastPort int
Get the multicast port
read-only, inherited
name String
Get the name of this Host. Must have been set using the set property or constructor
read / write, inherited
ready Future<bool>
If this device is ready to
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

connectTo(Device device, {String ipAddress}) → void
The client can connect to the Server that is already listening for connection. ipAddress is the IP to use in connecting to the server if the default detected one is not the interface you want to use. ipAddress is not validated for correctness or if really it is owned by this Device All IP addresses for host can be obtained using the ipAddresses property
disconnect() Future<void>
override
discoverHosts([Future<bool> precondition]) Future<bool>
Client searches for AP hosts (Servers). The Client joins a multicast group to listens for advertisements. This method returns boolean future that indicates if the client was able to join the multicast group. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
send(Packet packet, Device device, {bool ignoreIfNotConnected: false}) → Future
Hosts can send messages to other devices using the internal socket contained in the Device. [...]
inherited
stopDiscovery() → void
A way to stop the Client from further listening on multicast discovery messages. This is particularly useful when you have found the host with the required service.
toString() String
Returns a string representation of this object.
inherited

Operators

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