sockIPFromName (Function) |
Top Previous Next |
Makes a 32 bit IP address out of a dotted format like "80.62.33.111". It can also resolve a symbolic name like "logicio.com".
Note: when the default network interface is selected, the sockIPFromName function will try to resolve the symbolic name using the first connected network. The sockIPFromName function will look for a connected network, starting with Mobile network and working up. (LAN1 network, then LAN 2 network, etc.)
Input: str : STRING IP address (in dotted format "aaa.bbb.ccc.ddd" or symbolic "domain.xyz").
iface : SINT (default 0) The network interface to use. 0 = Default, 1 = Mobile network, 2 = LAN network, etc. (See Network)
Returns: DINT 32 bit IP address. 0 will be returned if address cannot be resolved.
Declaration: FUNCTION sockIPFromName : DINT;
Example:
|