Java.Net.URLConnection.ConnectTimeout Property
Returns the connect timeout in milliseconds.

Syntax

[get: Android.Runtime.Register("getConnectTimeout", "()I", "GetGetConnectTimeoutHandler")]
[set: Android.Runtime.Register("setConnectTimeout", "(I)V", "GetSetConnectTimeout_IHandler")]
public virtual int ConnectTimeout { get; set; }

Value

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif timeoutMillis < 0.
Java.Lang.IllegalArgumentExceptionif timeoutMillis < 0.
Java.Lang.IllegalArgumentExceptionif timeoutMillis < 0.
Java.Lang.IllegalArgumentExceptionif timeoutMillis < 0.
Java.Lang.IllegalArgumentExceptionif timeoutMillis < 0.

Remarks

Get method documentation [Android Documentation]

Returns the connect timeout in milliseconds. (See {#setConnectTimeout}.)

Set method documentation [Android Documentation]

Sets the maximum time in milliseconds to wait while connecting. Connecting to a server will fail with a Java.Net.SocketTimeoutException if the timeout elapses before a connection is established. The default value of 0 causes us to do a blocking connect. This does not mean we will never time out, but it probably means you'll get a TCP timeout after several minutes. Warning: if the hostname resolves to multiple IP addresses, this client will try each in order. If connecting to each of these addresses fails, multiple timeouts will elapse before the connect attempt throws an exception. Host names that support both IPv6 and IPv4 always have at least 2 IP addresses.

Requirements

Namespace: Java.Net
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1