Create a new address from hostname, port and an interface name e.g.
eth0, wlan0.
- Note
- Hostname will be resolved and reresolved when needed.
-
The interface index will only be used to force a multicast server to listen on a specific interface; it is ignored for all other address types and uses.
- Parameters
-
hostname | The hostname this should not be NULL. |
port | The port number. |
iface | The interface name over which a multicast address is valid. 0 (the default) means the platform will choose the most appropriate interface. |
- Returns
- The new address, or NULL if one could not be created. If the SO_BINDTODEVICE socket option is not supported and the interface is greater than 0, this function will return NULL.
- Resource Management:
- This function allocates resources that must later be freed by calling DOFAddress_Destroy.