Gio.Socket.prototype.get_remote_address

function get_remote_address(): Gio.SocketAddress {
    // Gjs wrapper for g_socket_get_remote_address()
}
  

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

Since 2.22

Returns

a Gio.SocketAddress or null on error. Free the returned object with GObject.Object.prototype.unref.