:right-sidebar: True InetSocketAddress =================================================================== .. currentmodule:: gi.repository.Gio .. class:: InetSocketAddress(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gio.SocketAddress`, :class:`~gi.repository.GObject.Object` Subclasses: :class:`~gi.repository.Gio.ProxyAddress` Implemented Interfaces: :class:`~gi.repository.Gio.SocketConnectable` An IPv4 or IPv6 socket address. That is, the combination of a :obj:`~gi.repository.Gio.InetAddress` and a port number. In UNIX terms, ``GInetSocketAddress`` corresponds to a ```struct sockaddr_in`` or ``struct sockaddr_in6`` `__\. Constructors ------------ .. rst-class:: interim-class .. class:: InetSocketAddress :no-index: .. classmethod:: new(address: ~gi.repository.Gio.InetAddress, port: int) -> ~gi.repository.Gio.SocketAddress Creates a new :obj:`~gi.repository.Gio.InetSocketAddress` for ``address`` and ``port``\. .. versionadded:: 2.22 :param address: a :obj:`~gi.repository.Gio.InetAddress` :param port: a port number .. classmethod:: new_from_string(address: str, port: int) -> ~gi.repository.Gio.SocketAddress | None Creates a new :obj:`~gi.repository.Gio.InetSocketAddress` for ``address`` and ``port``\. If ``address`` is an IPv6 address, it can also contain a scope ID (separated from the address by a ``%``\). .. versionadded:: 2.40 :param address: the string form of an IP address :param port: a port number Methods ------- .. rst-class:: interim-class .. class:: InetSocketAddress :no-index: .. method:: get_address() -> ~gi.repository.Gio.InetAddress Gets ``address``\'s :obj:`~gi.repository.Gio.InetAddress`\. .. versionadded:: 2.22 .. method:: get_flowinfo() -> int Gets the ``sin6_flowinfo`` field from ``address``\, which must be an IPv6 address. .. versionadded:: 2.32 .. method:: get_port() -> int Gets ``address``\'s port. .. versionadded:: 2.22 .. method:: get_scope_id() -> int Gets the ``sin6_scope_id`` field from ``address``\, which must be an IPv6 address. .. versionadded:: 2.32 Properties ---------- .. rst-class:: interim-class .. class:: InetSocketAddress :no-index: .. attribute:: props.address :type: ~gi.repository.Gio.InetAddress The type of the None singleton. .. versionadded:: 2.22 .. attribute:: props.flowinfo :type: int The type of the None singleton. .. versionadded:: 2.32 .. attribute:: props.port :type: int The type of the None singleton. .. versionadded:: 2.22 .. attribute:: props.scope_id :type: int The type of the None singleton. .. versionadded:: 2.32 Fields ------ .. rst-class:: interim-class .. class:: InetSocketAddress :no-index: .. attribute:: parent_instance .. attribute:: priv