StandardSocketOptions.IpTos Property

Definition

The Type of Service (ToS) octet in the Internet Protocol (IP) header.

[Android.Runtime.Register("IP_TOS", ApiSince=24)]
public static Java.Net.ISocketOption? IpTos { get; }
[<Android.Runtime.Register("IP_TOS", ApiSince=24)>]
static member IpTos : Java.Net.ISocketOption

Property Value

Attributes

Remarks

The Type of Service (ToS) octet in the Internet Protocol (IP) header.

The value of this socket option is an Integer representing the value of the ToS octet in IP packets sent by sockets to an StandardProtocolFamily#INET IPv4 socket. The interpretation of the ToS octet is network specific and is not defined by this class. Further information on the ToS octet can be found in RFC 1349 and RFC 2474. The value of the socket option is a <em>hint</em>. An implementation may ignore the value, or ignore specific values.

The initial/default value of the TOS field in the ToS octet is implementation specific but will typically be 0. For datagram-oriented sockets the option may be configured at any time after the socket has been bound. The new value of the octet is used when sending subsequent datagrams. It is system dependent whether this option can be queried or changed prior to binding the socket.

The behavior of this socket option on a stream-oriented socket, or an StandardProtocolFamily#INET6 IPv6 socket, is not defined in this release.

Java documentation for java.net.StandardSocketOptions.IP_TOS.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to