Share via


URLConnection.ReadTimeout Property

Definition

Returns setting for read timeout. -or- Sets the read timeout to a specified timeout, in milliseconds.

public virtual int ReadTimeout { [Android.Runtime.Register("getReadTimeout", "()I", "GetGetReadTimeoutHandler")] get; [Android.Runtime.Register("setReadTimeout", "(I)V", "GetSetReadTimeout_IHandler")] set; }
[<get: Android.Runtime.Register("getReadTimeout", "()I", "GetGetReadTimeoutHandler")>]
[<set: Android.Runtime.Register("setReadTimeout", "(I)V", "GetSetReadTimeout_IHandler")>]
member this.ReadTimeout : int with get, set

Property Value

an int that indicates the read timeout value in milliseconds

Attributes

Remarks

Property getter documentation:

Returns setting for read timeout. 0 return implies that the option is disabled (i.e., timeout of infinity).

Added in 1.5.

Java documentation for java.net.URLConnection.getReadTimeout().

Property setter documentation:

Sets the read timeout to a specified timeout, in milliseconds. A non-zero value specifies the timeout when reading from Input stream when a connection is established to a resource. If the timeout expires before there is data available for read, a java.net.SocketTimeoutException is raised. A timeout of zero is interpreted as an infinite timeout.

Some non-standard implementation of this method ignores the specified timeout. To see the read timeout set, please call getReadTimeout().

Added in 1.5.

Java documentation for java.net.URLConnection.setReadTimeout(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