BindIPEndPoint Delegate


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Represents the method that specifies a local Internet Protocol address and port number for a ServicePoint.

Namespace:   System.Net
Assembly:  System (in System.dll)

public delegate IPEndPoint BindIPEndPoint(
	ServicePoint servicePoint,
	IPEndPoint remoteEndPoint,
	int retryCount


Type: System.Net.ServicePoint

The ServicePoint associated with the connection to be created.

Type: System.Net.IPEndPoint

The remote IPEndPoint that specifies the remote host.

Type: System.Int32

The number of times this delegate was called for a specified connection.

Return Value

Type: System.Net.IPEndPoint

The local IPEndPoint to which the ServicePoint is bound.

Exception Condition

retryCount is equal to Int32.MaxValue

Specify that the BindIPEndPoint delegate is used by a ServicePoint by setting the ServicePoint.BindIPEndPointDelegate property with the delegate as an argument. This delegate should specify a local IP address and port number in the returned IPEndPoint.

If the .NET Framework cannot bind the returned IPEndPoint to the ServicePoint after Int32.MaxValue attempts, an OverflowException is thrown.

If you want the delegate to give the service point control of the connection binding, the delegate should return null. If you want to abort the connection, the delegate must throw an exception.

.NET Framework
Available since 2.0
Return to top