Network Interface Class Pattern
The Network Interface Class Pattern defines a common interface for objects that provide access to network interfaces, such as Ethernet and Wi-Fi.
Instance Properties
Section titled “Instance Properties”connection
Section titled “connection”A read-only property indicating the current connection state of the network interface.
A read-only string representing the MAC address assigned to the network interface.
address
Section titled “address”A read-only string representing the IP address assigned to the network interface.
Instance Methods
Section titled “Instance Methods”connect(options)
Section titled “connect(options)”Initiates the process of connecting to a network.
disconnect()
Section titled “disconnect()”Disconnects the network interface from the network.
Callbacks
Section titled “Callbacks”onChanged(name)
Section titled “onChanged(name)”A callback function invoked when the state of the network interface changes.