Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GInetSocketAddressMeta

[188:14] static extends: object

Generated metadata helpers for InetSocketAddress class surfaces.

Methods

  • properties ()

    Returns property metadata for InetSocketAddress.

    • @r A list.

class: GInetSocketAddressCtors

[165:14] static extends: object

Alternate constructors for GInetSocketAddress. Usage: GInetSocketAddressCtors.<name>(...). The primary constructor lives directly on GInetSocketAddress.

Methods

  • newFromString (string address, int port)

    Creates a new #GInetSocketAddress for @address and @port. If @address is an IPv6 address, it can also contain a scope ID (separated from the address by a %). Note that currently this behavior is platform specific. This may change in a future release.

    • @p address is the string form of an IP address.
    • @p port is a port number.
    • @r A new GInetSocketAddress.

class: GInetSocketAddress

[15:7] extends: object

An IPv4 or IPv6 socket address. That is, the combination of a [class@Gio.InetAddress] and a port number. In UNIX terms, GInetSocketAddress corresponds to a struct sockaddr_in or struct sockaddr_in6.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • GInetSocketAddress (address = null, port = null)

    Creates a new #GInetSocketAddress for @address and @port.

    • @p address is a #GInetAddress.
    • @p port is a port number.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asSocketAddress ()

    Wraps this handle as GSocketAddress.

    • @r A GSocketAddress object.
  • asSocketConnectable ()

    Wraps this handle as GSocketConnectable.

    • @r A GSocketConnectable object.
  • get_address ()

    Gets @address's #GInetAddress.

    • @r the #GInetAddress for @address, which must be g_object_ref()'d if it will be stored.
  • get_flowinfo ()

    Gets the sin6_flowinfo field from @address, which must be an IPv6 address. If not overridden this value will be inherited from [property@Gio.InetSocketAddress:address].

    • @r the flowinfo field.
  • get_port ()

    Gets @address's port.

    • @r the port for @address.
  • get_scope_id ()

    Gets the sin6_scope_id field from @address, which must be an IPv6 address. If not overridden this value will be inherited from [property@Gio.InetSocketAddress:address].

    • @r the scope id field.