Constructor

GioInetSocketAddressnew_from_string

Declaration

GSocketAddress*
g_inet_socket_address_new_from_string (
  const char* address,
  guint port
)

Description

Creates a new GInetSocketAddress for address and port.

If address is an IPv6 address, it can also contain a scope ID (separated from the address by a %).

Available since:2.40

Parameters

address const char*
 

The string form of an IP address.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
port guint
 

A port number.

Return value

Returns: GSocketAddress
 

A new GInetSocketAddress, or NULL if address cannot be parsed.

 The caller of the function takes ownership of the data, and is responsible for freeing it.
 The return value can be NULL.