The property makes it possible to instruct instances of HttpRequest class created by a HttpRequestCreator to automaticly establishment an Internet connection.
Default value of the property is Disabled. Internet connection is not established automatically.
After setting this property to Enabled, HttpRequest attempts to establish an Internet connection automatically, although it uses a slightly different method than .NET Compact Framework's WebRequest. See the remarks section for details.
Namespace:
Rebex.Net
Assembly:
Rebex.Http (in Rebex.Http.dll)
Syntax
Visual Basic |
---|
Public Property AutoConnectToInternet As AutoConnectType Get Set |
C# |
---|
public AutoConnectType AutoConnectToInternet { get; set; } |
Remarks
Setting this property to Allowed()()()() enables unconditional behavior in HttpRequest, which can be described as follows:
1) When the Internet connection is required, HttpRequestalways detects presence or absence of an active Internet connection on a device using the IsConnected()()()() property.
2) If the IsConnected()()()() property returns true, then HttpRequest assumes that the connection is already active and tries to continue.
3) If the IsConnected()()()() property returns false, then HttpRequest calls [M:Rebex.Net.ConnectionManagement.ConnectionManager.TryConnect()] method. When the [M:Rebex.Net.ConnectionManagement.ConnectionManager.TryConnect()] method returns, HttpRequest tries to continue (regardless the method call result).
For more information about the consequences and limitations of the ConnectionManager behavior, see the documentation for the IsConnected()()()() property and the documentation for the TryConnect()()()() method.The high level description of the algorithm above is provided for your convenience, but neither the description nor the current behavior is a part of the API contract. Implementation details of the algorithm are subjects to change in next releases.