## GInetSocketAddress GInetSocketAddress — Internet GSocketAddress |

## Synopsis

                        GInetSocketAddress;
    GSocketAddress *    g_inet_socket_address_new           (GInetAddress *address,
                                                             guint16 port);
    GInetAddress *      g_inet_socket_address_get_address   (GInetSocketAddress *address);
    guint16             g_inet_socket_address_get_port      (GInetSocketAddress *address);

## Object Hierarchy

      GObject
       +----GSocketAddress
             +----GInetSocketAddress
                   +----GProxyAddress

## Implemented Interfaces

GInetSocketAddress implements GSocketConnectable.

## Properties

      "address"                  GInetAddress*         : Read / Write / Construct Only
      "port"                     guint                 : Read / Write / Construct Only

## Description

An IPv4 or IPv6 socket address; that is, the combination of a GInetAddress and a port number.

## Details

### GInetSocketAddress

    typedef struct _GInetSocketAddress GInetSocketAddress;

An IPv4 or IPv6 socket address, corresponding to a struct sockaddr_in or struct sockaddr_in6.

### g_inet_socket_address_new ()

    GSocketAddress *    g_inet_socket_address_new           (GInetAddress *address,
                                                             guint16 port);

Creates a new GInetSocketAddress for `address` and `port`.

`address` : | a GInetAddress
`port` : | a port number
Returns : | a new GInetSocketAddress

Since 2.22

### g_inet_socket_address_get_address ()

    GInetAddress *      g_inet_socket_address_get_address   (GInetSocketAddress *address);

Gets `address`'s GInetAddress.

`address` : | a GInetSocketAddress
Returns : | the GInetAddress for `address`, which must be `g_object_ref()`'d if it will be stored

Since 2.22

### g_inet_socket_address_get_port ()

    guint16             g_inet_socket_address_get_port      (GInetSocketAddress *address);

Gets `address`'s port.

`address` : | a GInetSocketAddress
Returns : | the port for `address`

Since 2.22

## Property Details

### The `"address"` property

      "address"                  GInetAddress*         : Read / Write / Construct Only

The address.

### The `"port"` property

      "port"                     guint                 : Read / Write / Construct Only

The port.

Allowed values: <= 65535

Default value: 0