Class InetSocketAddress

All Implemented Interfaces:
PointerInterface
Direct Known Subclasses:
ProxyAddress

public class InetSocketAddress extends SocketAddress
An IPv4 or IPv6 socket address; that is, the combination of a
#GInetAddress and a port number.

https://docs.gtk.org/gio/class.InetSocketAddress.html

  • Constructor Details

    • InetSocketAddress

      public InetSocketAddress(PointerContainer pointer)
    • InetSocketAddress

      public InetSocketAddress(@Nonnull InetAddress address, int port)
      Creates a new #GInetSocketAddress for @address and @port.
      Parameters:
      address - a #GInetAddress
      port - a port number
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • newFromStringInetSocketAddress

      public static InetSocketAddress newFromStringInetSocketAddress(@Nonnull Str 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 `%`).
      Parameters:
      address - the string form of an IP address
      port - a port number
      Returns:
      a new #GInetSocketAddress, or %NULL if @address cannot be parsed.
    • newFromStringInetSocketAddress

      public static InetSocketAddress newFromStringInetSocketAddress(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 `%`).
      Parameters:
      address - the string form of an IP address
      port - a port number
      Returns:
      a new #GInetSocketAddress, or %NULL if @address cannot be parsed.
    • getAddress

      public InetAddress getAddress()
      Gets @address's #GInetAddress.
      Returns:
      the #GInetAddress for @address, which must be g_object_ref()'d if it will be stored
    • getFlowinfo

      public int getFlowinfo()
      Gets the `sin6_flowinfo` field from @address,
      which must be an IPv6 address.
      Returns:
      the flowinfo field
    • getPort

      public int getPort()
      Gets @address's port.
      Returns:
      the port for @address
    • getScopeId

      public int getScopeId()
      Gets the `sin6_scope_id` field from @address,
      which must be an IPv6 address.
      Returns:
      the scope id field
    • asSocketConnectable

      public SocketConnectable asSocketConnectable()
      Implements interface SocketConnectable. Call this to get access to interface functions.
      Overrides:
      asSocketConnectable in class SocketAddress
      Returns:
      SocketConnectable
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()