Method

GioSocketget_local_address

since: 2.22

Declaration [src]

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

Description [src]

Try to get the local address of a bound socket. This is only useful if the socket has been bound to a local address, either explicitly or implicitly when connecting.

Available since: 2.22

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 returned data, and is responsible for freeing it.