Class

GioSocketAddress

Description [src]

abstract class Gio.SocketAddress : GObject.Object {
  parent_instance: GObject
}

GSocketAddress is the equivalent of struct sockaddr in the BSD sockets API. This is an abstract class; use GInetSocketAddress for internet sockets, or GUnixSocketAddress for UNIX domain sockets.

Hierarchy

hierarchy this GSocketAddress implements_0 GSocketConnectable this--implements_0 ancestor_0 GObject ancestor_0--this

Ancestors

Implements

Constructors

g_socket_address_new_from_native

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

Available since: 2.22

Instance methods

g_socket_address_get_family

Gets the socket family type of address.

Available since: 2.22

g_socket_address_get_native_size

Gets the size of addresss native struct sockaddr. You can use this to allocate memory to pass to g_socket_address_to_native().

Available since: 2.22

g_socket_address_to_native

Converts a GSocketAddress to a native struct sockaddr, which can be passed to low-level functions like connect() or bind().

Available since: 2.22

Methods inherited from GObject (43)
Methods inherited from GSocketConnectable (3)
g_socket_connectable_enumerate

Creates a GSocketAddressEnumerator for connectable.

Available since: 2.22

g_socket_connectable_proxy_enumerate

Creates a GSocketAddressEnumerator for connectable that will return a GProxyAddress for each of its addresses that you must connect to via a proxy.

Available since: 2.26

g_socket_connectable_to_string

Format a GSocketConnectable as a string. This is a human-readable format for use in debugging output, and is not a stable serialization format. It is not suitable for use in user interfaces as it exposes too much information for a user.

Available since: 2.48

Properties

Gio.SocketAddress:family
No description available.

Signals

Signals inherited from GObject (1)

Class structure

struct GioSocketAddressClass {
  GObjectClass parent_class;
  GSocketFamily (* get_family) (
    GSocketAddress* address
  );
  gssize (* get_native_size) (
    GSocketAddress* address
  );
  gboolean (* to_native) (
    GSocketAddress* address,
    gpointer dest,
    gsize destlen,
    GError** error
  );
  
}
Class members
parent_class
GObjectClass
  No description available.
get_family
GSocketFamily (* get_family) (
    GSocketAddress* address
  )
  No description available.
get_native_size
gssize (* get_native_size) (
    GSocketAddress* address
  )
  No description available.
to_native
gboolean (* to_native) (
    GSocketAddress* address,
    gpointer dest,
    gsize destlen,
    GError** error
  )
  No description available.

Virtual methods

Gio.SocketAddressClass.get_family

Gets the socket family type of address.

Available since: 2.22

Gio.SocketAddressClass.get_native_size

Gets the size of addresss native struct sockaddr. You can use this to allocate memory to pass to g_socket_address_to_native().

Available since: 2.22

Gio.SocketAddressClass.to_native

Converts a GSocketAddress to a native struct sockaddr, which can be passed to low-level functions like connect() or bind().

Available since: 2.22