Gio.Socket.get_remote_address

### Method

# Gio Socketget_remote_address

since: 2.22

#### Declaration

    GSocketAddress*
    g_socket_get_remote_address (
      GSocket* socket
      GError** error
    )

#### Description

Try to get the remote address of a connected socket. This is only useful for connection oriented sockets that have been connected.

Available since: 2.22

Gets property | `Gio.Socket:remote-address`

#### Return value

Type: `GSocketAddress`

A `GSocketAddress` or `NULL` on error. Free the returned object with g_object_unref().

The caller of the method takes ownership of the data, and is responsible for freeing it.