SocketOptions.SoLinger 欄位
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
This constant will be removed in the future version. Use Java.Net.SocketOption enum directly instead of this field.
指定一個停留在關閉時間的超時。
[Android.Runtime.Register("SO_LINGER")]
[System.Obsolete("This constant will be removed in the future version. Use Java.Net.SocketOption enum directly instead of this field.", true)]
public const Java.Net.SocketOption SoLinger = 128;
[<Android.Runtime.Register("SO_LINGER")>]
[<System.Obsolete("This constant will be removed in the future version. Use Java.Net.SocketOption enum directly instead of this field.", true)>]
val mutable SoLinger : Java.Net.SocketOption
欄位值
Value = 128- 屬性
備註
指定一個停留在關閉時間的超時。 此選項會啟用或啟用 TCP 套接字中 B>關閉()</B> 的即時回傳<。 啟用此選項並設定非零整數 逾時 ,表示 <B>關閉()</B> 會阻塞,等待所有寫入該節點的資料傳輸與確認,此時套接字會 優雅地關閉。 當到達殘留逾時時,套接字會被 強制關閉,並以 TCP RST 關閉。 啟用該選項且超時為零,會立即強制關閉。 若逾時值超過 65,535,則將縮短至 65,535。
僅適用於 TCP:SocketImpl
Java 文件 java.net.SocketOptions.SO_LINGER。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。