Function

Purplenetwork_get_my_ip_from_gio

since: 3.0

Declaration [src]

gchar*
purple_network_get_my_ip_from_gio (
  GSocketConnection* sockconn
)

Description [src]

Returns the IP address that should be used anywhere a public IP address is needed (listening for an incoming file transfer, etc).

If the user has manually specified an IP address via preferences, then this IP is returned. Otherwise STUN, UPnP, NAT-PMP, and finally GIO will be attempted to discover the local IP address depending on what’s available.

Available since: 3.0

Parameters

sockconn

Type: GSocketConnection

The socket connection to use to help figure out the IP, or NULL.

The data is owned by the caller of the function.

Return value

Type: gchar*

The local IP address to be used.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.