Class IPTosMessage
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.gnome.gio.SocketControlMessage
org.gnome.gio.IPTosMessage
- All Implemented Interfaces:
Proxy
Contains the type of service (ToS) byte of an IPv4 header.
This consists of the DSCP field as per RFC 2474, and the ECN field as per RFC 3168.
It may be received using Socket.receiveMessage(Out, InputVector[], Out, Out, Cancellable) over UDP sockets
(i.e. sockets in the G_SOCKET_FAMILY_IPV4 family with
G_SOCKET_TYPE_DATAGRAM type). The message is not meant for sending. To set
ToS field to be used in datagrams sent on a Socket use:
g_socket_set_option (socket, IPPROTO_IP, IP_TOS, <ToS value>, &error);
- Since:
- 2.88
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classIPTosMessage.Builder<B extends IPTosMessage.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class SocketControlMessage
SocketControlMessage.SocketControlMessage$Impl, SocketControlMessage.SocketControlMessageClassNested classes/interfaces inherited from class GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new IPTosMessage.IPTosMessage(byte dscp, EcnCodePoint ecn) Creates a new type-of-service message with given DSCP and ECN values.IPTosMessage(MemorySegment address) Create a IPTosMessage instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected IPTosMessageasParent()Return this instance as if it were its parent type.static IPTosMessage.Builder<? extends IPTosMessage.Builder> builder()AIPTosMessage.Builderobject constructs aIPTosMessagewith the specified properties.bytegetDscp()Gets the differentiated services code point stored inmessage.getEcn()Gets the Explicit Congestion Notification code point stored inmessage.static MemoryLayoutThe memory layout of the native struct.static @Nullable TypegetType()Get the GType of the IPTosMessage class.Methods inherited from class SocketControlMessage
deserialize, getLevel, getMsgType, getSize, serializeMethods inherited from class GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
IPTosMessage
Create a IPTosMessage instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
IPTosMessage
Creates a new type-of-service message with given DSCP and ECN values.- Parameters:
dscp- the DSCP value of the messageecn- the ECN value of the message- Since:
- 2.88
-
IPTosMessage
public IPTosMessage()Create a new IPTosMessage.
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Return this instance as if it were its parent type. Comparable to the Javasuperkeyword, but ensures the parent typeclass is also used in native code.- Overrides:
asParentin classSocketControlMessage- Returns:
- the instance as if it were its parent type
-
getDscp
public byte getDscp()Gets the differentiated services code point stored inmessage.- Returns:
- A DSCP value as described in RFC 2474.
- Since:
- 2.88
-
getEcn
Gets the Explicit Congestion Notification code point stored inmessage.- Returns:
- An ECN value as described in RFC 3168.
- Since:
- 2.88
-
builder
AIPTosMessage.Builderobject constructs aIPTosMessagewith the specified properties. Use the variousset...()methods to set properties, and finish construction withIPTosMessage.Builder.build().- Returns:
- the builder object
-