Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: InetSocketAddress

[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

  • InetSocketAddress (address = null, port = null)

    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.
  • 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 SocketAddress.

    • @r A SocketAddress object.
  • asSocketConnectable ()

    Wraps this handle as SocketConnectable.

    • @r A SocketConnectable object.
  • get_address ()

    Gets @address's #GInetAddress.

class: InetSocketAddressMeta

[134:14] static extends: object

Generated metadata helpers for InetSocketAddress class surfaces.

Methods

  • properties ()

    Returns property metadata for InetSocketAddress.

    • @r A list.