Host class

A Host is a generic endpoint (STA/AP) in the network. A Client and a Server are both hosts.

Implementers

Constructors

Host({String name, int multicastPort, IPVersion ipVersion, DeviceDiscoveryListener deviceDiscoveryListener, ConnectionListener connectionListener})
name is useful for host/device identification purposes especially if discovery is enabled. If you specify a name, the name will be sent to communicating devices to add as a user friendly name during discovery. [...]

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
interfaceAddresses Future<Iterable<Map<NetworkInterface, Iterable<InternetAddress>>>>
Get a Map of all the interfaces and IP addresses found in the interfaces
read-only
interfaces Future<List<NetworkInterface>>
Get all the interfaces found in this Host
read-only
ipAddress String
Get the first detected IP address which the host could listen on (if Server) or connect using (if Client)
read-only
ipAddresses Future<Iterable<String>>
Get all IP addresses for all IP versions
read-only
ipv4Addresses Future<Iterable<String>>
Get all IP addresses for IPv4
read-only
ipv6Addresses Future<Iterable<String>>
Get all IP addresses for IPv6
read-only
multicastIPAddress String
Get the multicast Group IP Address being used
read-only
multicastPort int
Get the multicast port
read-only
name String
Get the name of this Host. Must have been set using the set property or constructor
read / write
ready Future<bool>
If the Host (Client/Server) has completed it's initialization phase and is ready to start advertising/discovering services. [...]
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

disconnect() Future<void>
Disconnect from the host
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. [...]
toString() String
Returns a string representation of this object.
inherited

Operators

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

Constants

DEFAULT_MULTICAST_GROUP_IPV4 → const String
"225.225.225.225"
DEFAULT_MULTICAST_GROUP_IPV6 → const String
"FF02::FB"
DEFAULT_MULTICAST_PORT → const int
5018