次の方法で共有


HttpConnectionParams.SetLinger(IHttpParams, Int32) Method

Definition

Returns linger-on-close timeout.

[Android.Runtime.Register("setLinger", "(Lorg/apache/http/params/HttpParams;I)V", "")]
public static void SetLinger (Org.Apache.Http.Params.IHttpParams? params, int value);
[<Android.Runtime.Register("setLinger", "(Lorg/apache/http/params/HttpParams;I)V", "")>]
static member SetLinger : Org.Apache.Http.Params.IHttpParams * int -> unit

Parameters

params
IHttpParams
value
Int32

the linger-on-close timeout

Attributes

Remarks

Returns linger-on-close timeout. This option disables/enables immediate return from a close() of a TCP Socket. Enabling this option with a non-zero Integer timeout means that a close() will block pending the transmission and acknowledgement of all data written to the peer, at which point the socket is closed gracefully. Value 0 implies that the option is disabled. Value -1 implies that the JRE default is used.

Java documentation for org.apache.http.params.HttpConnectionParams.setLinger(org.apache.http.params.HttpParams, int).

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