public class ServicePoint
|
ServicePoint instances are managed by the ServicePointManager class and are created, if necessary, by the ServicePointManager.FindServicePoint method. The maximum number of ServicePoint instances that can be created is set by the ServicePointManager.MaxServicePoints property.
Each ServicePoint instance maintains its connection to an Internet resource until it has been idle longer than the time specified in the ServicePoint.MaxIdleTime property. Once a ServicePoint exceeds the ServicePoint.MaxIdleTime, it can be recycled to another connection. The default value of ServicePoint.MaxIdleTime is set by the ServicePointManager.MaxServicePointIdleTime property.
Uri myUri = new Uri("http://www.contoso.com/"); ServicePoint mySP = ServicePointManager.FindServicePoint(myUri);
Address | Read-only Gets the URI of the ServicePoint. |
ConnectionLimit | Read-write Gets or sets the maximum number of connections allowed on this ServicePoint. |
ConnectionName | Read-only Gets the connection group name established by the WebRequest that created the connection. |
CurrentConnections | Read-only Gets the number of connections associated with this ServicePoint. |
IdleSince | Read-only Gets the date and time that the ServicePoint was last connected to a host. |
MaxIdleTime | Read-write Gets or sets the amount of time the ServicePoint can remain idle (unconnected to a host). |
ProtocolVersion | Read-only Gets the version of the HTTP protocol that the ServicePoint uses. |
SupportsPipelining | Read-only Indicates whether the ServicePoint supports pipelined connections. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetHashCode | Overridden: Gets the hash code for the ServicePoint. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
public Uri Address {get;}
|
public int ConnectionLimit {get; set;}
|
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | The connection limit is 0 or less than 0. |
public string ConnectionName {get;}
|
public int CurrentConnections {get;}
|
public DateTime IdleSince {get;}
|
public int MaxIdleTime {get; set;}
|
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | ServicePoint.MaxIdleTime is set to less than Timeout.Infinite and greater than Int32.MaxValue. |
You can set ServicePoint.MaxIdleTime to Timeout.Infinite to indicate that the ServicePoint should never timeout.
The default value of the ServicePoint.MaxIdleTime property is the value of the ServicePointManager.MaxServicePointIdleTime property when the ServicePoint is created. Subsequent changes to the ServicePointManager.MaxServicePointIdleTime property have no effect on existing ServicePoint instances.
public virtual Version ProtocolVersion {get;}
|
public bool SupportsPipelining {get;}
|
~ServicePoint(); |
public override int GetHashCode(); |
A
and
B
is the same if
A.Equals(B)
is true.This method implements the Object.GetHashCode method.
public Type GetType(); |
protected object MemberwiseClone(); |
public virtual string ToString(); |