Returns a local address. This function should be used instead of using 127.0.0.1 or localhost.
Set the address to hostname, which can be a host name or an IP-style address in dot notation (a.b.c.d)
Sets the port according to the specified service. If service is a sequence, then the port is set to the corresponding service, otherwise, the port is set to service.