Host class
A Host is a generic endpoint (STA/AP) in the network. A Client and a Server are both hosts.
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> > -
read-only
-
interfaces
→ Future<
List< NetworkInterface> > -
read-only
- ipAddress → String
-
Get the detected IP address
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
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 this device is ready to
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
disconnect(
) → Future< void> -
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