다음을 통해 공유


StandardSocketOptions.TcpNodelay Property

Definition

Disable the Nagle algorithm.

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

Property Value

Attributes

Remarks

Disable the Nagle algorithm.

The value of this socket option is a Boolean that represents whether the option is enabled or disabled. The socket option is specific to stream-oriented sockets using the TCP/IP protocol. TCP/IP uses an algorithm known as <em>The Nagle Algorithm</em> to coalesce short segments and improve network efficiency.

The default value of this socket option is FALSE. The socket option should only be enabled in cases where it is known that the coalescing impacts performance. The socket option may be enabled at any time. In other words, the Nagle Algorithm can be disabled. Once the option is enabled, it is system dependent whether it can be subsequently disabled. If it cannot, then invoking the setOption method to disable the option has no effect.

Java documentation for java.net.StandardSocketOptions.TCP_NODELAY.

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