A socket handle.
The LAN device.
A port number.
Optional
tls: booleanIf true, establish a TLS connection.
A LAN device in local LAN can be detected through nDNS or uPNP. Because the IP of LAN device may change due to DHCP, Libertas Hub will keep tracking the actual IP address of each LAN device.
The socket must be a new socket or an existing closed socket. A non-closed socket is not available to be reused. Calling on a non-closed socket will raise an error.
If an error happens on a socket, the socket is automatically closed thus is ready for reuse.
Connect to a LAN device.