Org.Apache.Http.Conn.IClientConnectionRequest.GetConnection Method
Obtains a connection within a given time.

Syntax

[Android.Runtime.Register("getConnection", "(JLjava/util/concurrent/TimeUnit;)Lorg/apache/http/conn/ManagedClientConnection;", "GetGetConnection_JLjava_util_concurrent_TimeUnit_Handler:Org.Apache.Http.Conn.IClientConnectionRequestInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public IManagedClientConnection GetConnection (long timeout, Java.Util.Concurrent.TimeUnit tunit)

Parameters

timeout
the timeout, 0 or negative for no timeout
tunit
the unit for the timeout, may be null only if there is no timeout

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Org.Apache.Http.Conn.ConnectionPoolTimeoutExceptionin case of a timeout
Java.Lang.InterruptedExceptionif the calling thread is interrupted while waiting

Remarks

Obtains a connection within a given time. This method will block until a connection becomes available, the timeout expires, or the connection manager is IClientConnectionManager.Shutdown. Timeouts are handled with millisecond precision. If IClientConnectionRequest.AbortRequest is called while this is blocking or before this began, an Java.Lang.InterruptedException will be thrown.

[Android Documentation]

Requirements

Namespace: Org.Apache.Http.Conn
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1