BindIPEndPoint 委托

定义

表示指定 ServicePoint 的本地 Internet 协议地址和端口号的方法。

public delegate System::Net::IPEndPoint ^ BindIPEndPoint(ServicePoint ^ servicePoint, IPEndPoint ^ remoteEndPoint, int retryCount);
public delegate System.Net.IPEndPoint BindIPEndPoint(ServicePoint servicePoint, IPEndPoint remoteEndPoint, int retryCount);
type BindIPEndPoint = delegate of ServicePoint * IPEndPoint * int -> IPEndPoint
Public Delegate Function BindIPEndPoint(servicePoint As ServicePoint, remoteEndPoint As IPEndPoint, retryCount As Integer) As IPEndPoint 

参数

servicePoint
ServicePoint

与要创建的连接关联的 ServicePoint

remoteEndPoint
IPEndPoint

指定远程主机的远程 IPEndPoint

retryCount
Int32

对于指定连接此委托被调用的次数。

返回值

IPEndPoint 绑定到的本地 ServicePoint

注解

BindIPEndPoint通过将 属性设置为ServicePoint.BindIPEndPointDelegate委托作为参数,指定 委托由 ServicePoint 使用。 此委托应在返回 IPEndPoint的 中指定本地 IP 地址和端口号。

如果.NET Framework尝试后Int32.MaxValue无法将返回IPEndPoint的 绑定到 ServicePointOverflowException则会引发 。

如果希望委托为连接绑定的服务点提供控制权,则委托应返回 null。 如果要中止连接,委托必须引发异常。

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。

适用于