[ CCode ( has_construct_function = false , type = "GSocketConnectable*" ) ]
[ Version ( since = "2.22" ) ]
public NetworkAddress (string hostname, uint16 port)
Creates a new SocketConnectable for connecting to the given hostname
and port
.
Note that depending on the configuration of the machine, a hostname
of `localhost` may refer to the IPv4 loopback address
only, or to both IPv4 and IPv6; use
NetworkAddress.loopback to create a NetworkAddress that is guaranteed to
resolve to both addresses.
hostname |
the hostname |
port |
the port |
the new NetworkAddress |