:right-sidebar: True IPv6TclassMessage =================================================================== .. currentmodule:: gi.repository.Gio .. versionadded:: 2.88 .. class:: IPv6TclassMessage(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gio.SocketControlMessage`, :class:`~gi.repository.GObject.Object` Contains the Traffic Class byte of an IPv6 header. This consists of the DSCP field as per `RFC 2474 `__\, and the ECN field as per `RFC 3168 `__\. It may be received using :obj:`~gi.repository.Gio.Socket.receive_message` over UDP sockets (i.e. sockets in the ``G_SOCKET_FAMILY_IPV6`` family with ``G_SOCKET_TYPE_DATAGRAM`` type). The message is not meant for sending. To set Traffic Class field to be used in datagrams sent on a :obj:`~gi.repository.Gio.Socket` use: .. code-block:: c :dedent: g_socket_set_option (socket, IPPROTO_IPV6, IPV6_TCLASS, , &error); Constructors ------------ .. rst-class:: interim-class .. class:: IPv6TclassMessage :no-index: .. classmethod:: new(dscp: int, ecn: ~gi.repository.Gio.EcnCodePoint) -> ~gi.repository.Gio.SocketControlMessage Creates a new traffic class message with given DSCP and ECN values. .. versionadded:: 2.88 :param dscp: the DSCP value of the message :param ecn: the ECN value of the message Methods ------- .. rst-class:: interim-class .. class:: IPv6TclassMessage :no-index: .. method:: get_dscp() -> int Gets the differentiated services code point stored in ``message``\. .. versionadded:: 2.88 .. method:: get_ecn() -> ~gi.repository.Gio.EcnCodePoint Gets the Explicit Congestion Notification code point stored in ``message``\. .. versionadded:: 2.88