语言

BindIPEndPoint 委托

定义

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

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参数的属性,指定委托使用ServicePoint.BindIPEndPointDelegate委托。 此委托应指定返回 IPEndPoint的本地 IP 地址和端口号。

如果 .NET Framework 无法将返回的返回IPEndPointServicePoint绑定到尝试后Int32.MaxValue,将引发一个OverflowException。

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

扩展方法

名称 说明
GetMethodInfo(Delegate)

获取一个对象,该对象表示由指定委托表示的方法。

适用于