BindIPEndPoint 委托
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示指定 ServicePoint 的本地 Internet 协议地址和端口号的方法。
public delegate System::Net::IPEndPoint ^ BindIPEndPoint(ServicePoint ^ servicePoint, IPEndPoint ^ remoteEndPoint, int retryCount);
C#
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无法将返回的 IPEndPointServicePoint 绑定到 ,OverflowException则会引发 。
如果希望委托为连接绑定的服务点提供控制权,则委托应返回 null
。 如果要中止连接,委托必须引发异常。
Get |
获取指示指定委托表示的方法的对象。 |
产品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |