SocketConnection.getRemoteAddress

Try to get the remote address of a socket connection.

Since GLib 2.40, when used with gio.socket_client.SocketClient.connect or gio.socket_client.SocketClient.connectAsync, during emission of gio.types.SocketClientEvent.Connecting, this function will return the remote address that will be used for the connection. This allows applications to print e.g. "Connecting to example.com (10.42.77.3)...".

class SocketConnection
getRemoteAddress
()

Return Value

Type: gio.socket_address.SocketAddress

a #GSocketAddress or null on error. Free the returned object with gobject.object.ObjectG.unref.