Gio.InetSocketAddress.new_from_string
Description: Reference for Gio.InetSocketAddress.new_from_string

### Constructor

# Gio InetSocketAddressnew_from_string

since: 2.40

#### Declaration [src]

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

#### Description [src]

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`

  Type: `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`

  Type: `guint`

  A port number.

#### Return value

Type: `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`.