Constructor

GioSocketAddressnew_from_native

since: 2.22

Declaration

GSocketAddress*
g_socket_address_new_from_native (
  gpointer native,
  gsize len
)

Description

Creates a GSocketAddress subclass corresponding to the native struct sockaddr native.

Available since: 2.22

Parameters

native

Type: gpointer

A pointer to a struct sockaddr.

The data is owned by the caller of the function.
len

Type: gsize

The size of the memory location pointed to by native.

Return value

Type: GSocketAddress

A new GSocketAddress if native could successfully be converted, otherwise NULL.

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