NetPeerTcpBinding NetPeerTcpBinding NetPeerTcpBinding NetPeerTcpBinding Class

定义

警告

此 API 现已过时。

为对等网络应用程序提供安全绑定。Provides a secure binding for peer-to-peer network applications.

public ref class NetPeerTcpBinding : System::ServiceModel::Channels::Binding, System::ServiceModel::Channels::IBindingRuntimePreferences
[System.Obsolete("PeerChannel feature is obsolete and will be removed in the future.", false)]
public class NetPeerTcpBinding : System.ServiceModel.Channels.Binding, System.ServiceModel.Channels.IBindingRuntimePreferences
type NetPeerTcpBinding = class
    inherit Binding
    interface IBindingRuntimePreferences
Public Class NetPeerTcpBinding
Inherits Binding
Implements IBindingRuntimePreferences
继承
NetPeerTcpBindingNetPeerTcpBindingNetPeerTcpBindingNetPeerTcpBinding
属性
实现

注解

NetPeerTcpBinding 绑定为创建使用 TCP 级别的对等网格基础结构的对等网络应用程序提供支持。The NetPeerTcpBinding binding provides support for the creation of peer networking applications that use a TCP-level peer-to-peer mesh infrastructure.

每个 PeerNode 实例均可承载使用此绑定类型定义的多个对等通道。Each PeerNode instance can host multiple peer channels defined with this binding type. 如果通道工厂是用此类型的已配置实例生成的,则可使用这些通道工厂生成对等通道。Channel factories produced using a configured instance of this type can be used to generate peer channels. 对等通道工厂可生成的对等通道包括只可输入通道(实现 IInputChannel)、只可输出通道(实现 IOutputChannel)和双工通道(实现 IDuplexChannel)。A peer channel factory can produce peer channels that are input-only (implements IInputChannel), output-only (implements IOutputChannel), and duplex (implements IDuplexChannel).

这是 Windows Communication Framework (WCF) 提供的标准绑定之一。This is one of the standard bindings provided by the Windows Communication Framework (WCF). 该绑定可以在命令性代码中使用,或在应用程序的相应 XML 配置文件中指定。It can be used in imperative code or specified in the corresponding XML configuration file for the application. 建议的过程是使用配置值定义绑定而不是使用基于代码的方法,除了必须将配置值设为已初始化的服务的某些高级方案之外。The recommended procedure is to define the binding using configuration values and not to use a code-based approach, except in certain advanced scenarios where configuration values must be set as a service is initialized.

构造函数

NetPeerTcpBinding() NetPeerTcpBinding() NetPeerTcpBinding() NetPeerTcpBinding()

初始化 NetPeerTcpBinding 类的新默认实例。Initializes a new default instance of the NetPeerTcpBinding class.

NetPeerTcpBinding(String) NetPeerTcpBinding(String) NetPeerTcpBinding(String) NetPeerTcpBinding(String)

使用指定配置名称初始化 NetPeerTcpBinding 类的新实例。Initializes a new instance of the NetPeerTcpBinding class with a specified configuration name.

属性

CloseTimeout CloseTimeout CloseTimeout CloseTimeout

获取或设置在传输引发异常之前可用于关闭连接的时间间隔。Gets or sets the interval of time provided for a connection to close before the transport raises an exception.

(Inherited from Binding)
EnvelopeVersion EnvelopeVersion EnvelopeVersion EnvelopeVersion

获取与此绑定一起使用的 SOAP 版本。Gets the SOAP version used with this binding.

IsPnrpAvailable IsPnrpAvailable IsPnrpAvailable IsPnrpAvailable

获取一个值,它指示 PNRP 服务是否已在计算机上安装并可用。Gets a value that indicates whether the PNRP service is installed and available on the computer.

ListenIPAddress ListenIPAddress ListenIPAddress ListenIPAddress

获取或设置本地对等节点用于侦听的 IP 地址。Gets or sets the IP address used for listening by the local peer node.

MaxBufferPoolSize MaxBufferPoolSize MaxBufferPoolSize MaxBufferPoolSize

获取或设置用于对等 TCP 缓冲区的内存池的最大大小(以字节为单位)。Gets or sets the maximum size, in bytes, of the memory pool used for the peer TCP buffer.

MaxReceivedMessageSize MaxReceivedMessageSize MaxReceivedMessageSize MaxReceivedMessageSize

获取或设置由此绑定创建的对等通道处理的 TCP 消息的最大大小(以字节为单位)。Gets or sets the maximum size, in bytes, of TCP messages handled by peer channels created by this binding.

MessageVersion MessageVersion MessageVersion MessageVersion

获取由绑定所配置的客户端和服务使用的消息版本。Gets the message version used by clients and services configured with the binding.

(Inherited from Binding)
Name Name Name Name

获取或设置绑定的名称。Gets or sets the name of the binding.

(Inherited from Binding)
Namespace Namespace Namespace Namespace

获取或设置绑定的 XML 命名空间。Gets or sets the XML namespace of the binding.

(Inherited from Binding)
OpenTimeout OpenTimeout OpenTimeout OpenTimeout

获取或设置在传输引发异常之前可用于打开连接的时间间隔。Gets or sets the interval of time provided for a connection to open before the transport raises an exception.

(Inherited from Binding)
Port Port Port Port

获取或设置要绑定的网络端口。Gets or sets the network port on which to bind.

ReaderQuotas ReaderQuotas ReaderQuotas ReaderQuotas

获取或设置与此绑定关联的 XmlDictionaryReaderQuotasGets or sets the XmlDictionaryReaderQuotas that is associated with this binding.

ReceiveTimeout ReceiveTimeout ReceiveTimeout ReceiveTimeout

获取或设置连接在撤消之前保持非活动状态的最大时间间隔,在此时间间隔内未接收任何应用程序消息。Gets or sets the interval of time that a connection can remain inactive, during which no application messages are received, before it is dropped.

(Inherited from Binding)
Resolver Resolver Resolver Resolver

获取 PeerResolver,此绑定实例将使用它将对等网格 ID 解析为对等网格中节点的终结点 IP 地址。Gets the PeerResolver used by this binding instance to resolve a peer mesh ID to the endpoint IP addresses of nodes within the peer mesh.

Scheme Scheme Scheme Scheme

获取用于传输协议(与此绑定关联)的 URI 方案。Gets the URI scheme used for the transport protocol associated with this binding.

Security Security Security Security

获取或设置要对此绑定创建的对等通道设置的安全性。Gets or sets the security to set on peer channels created by this binding.

SendTimeout SendTimeout SendTimeout SendTimeout

获取或设置在传输引发异常之前可用于完成写入操作的时间间隔。Gets or sets the interval of time provided for a write operation to complete before the transport raises an exception.

(Inherited from Binding)

方法

BuildChannelFactory<TChannel>(BindingParameterCollection) BuildChannelFactory<TChannel>(BindingParameterCollection) BuildChannelFactory<TChannel>(BindingParameterCollection) BuildChannelFactory<TChannel>(BindingParameterCollection)

在客户端上生成通道工厂堆栈,此通道工厂堆栈创建具有指定类型的通道并满足绑定参数集合所指定的功能。Builds the channel factory stack on the client that creates a specified type of channel and that satisfies the features specified by a collection of binding parameters.

(Inherited from Binding)
BuildChannelFactory<TChannel>(Object[]) BuildChannelFactory<TChannel>(Object[]) BuildChannelFactory<TChannel>(Object[]) BuildChannelFactory<TChannel>(Object[])

在客户端上生成通道工厂堆栈,该通道工厂堆栈创建具有指定类型的通道并满足对象数组所指定的功能。Builds the channel factory stack on the client that creates a specified type of channel and that satisfies the features specified by an object array.

(Inherited from Binding)
BuildChannelListener<TChannel>(BindingParameterCollection) BuildChannelListener<TChannel>(BindingParameterCollection) BuildChannelListener<TChannel>(BindingParameterCollection) BuildChannelListener<TChannel>(BindingParameterCollection)

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足绑定参数集合所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified by a collection of binding parameters.

(Inherited from Binding)
BuildChannelListener<TChannel>(Object[]) BuildChannelListener<TChannel>(Object[]) BuildChannelListener<TChannel>(Object[]) BuildChannelListener<TChannel>(Object[])

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified.

(Inherited from Binding)
BuildChannelListener<TChannel>(Uri, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, BindingParameterCollection)

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified.

(Inherited from Binding)
BuildChannelListener<TChannel>(Uri, Object[]) BuildChannelListener<TChannel>(Uri, Object[]) BuildChannelListener<TChannel>(Uri, Object[]) BuildChannelListener<TChannel>(Uri, Object[])

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified.

(Inherited from Binding)
BuildChannelListener<TChannel>(Uri, String, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, String, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, String, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, String, BindingParameterCollection)

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified.

(Inherited from Binding)
BuildChannelListener<TChannel>(Uri, String, ListenUriMode, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, String, ListenUriMode, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, String, ListenUriMode, BindingParameterCollection) BuildChannelListener<TChannel>(Uri, String, ListenUriMode, BindingParameterCollection)

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified.

(Inherited from Binding)
BuildChannelListener<TChannel>(Uri, String, ListenUriMode, Object[]) BuildChannelListener<TChannel>(Uri, String, ListenUriMode, Object[]) BuildChannelListener<TChannel>(Uri, String, ListenUriMode, Object[]) BuildChannelListener<TChannel>(Uri, String, ListenUriMode, Object[])

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified.

(Inherited from Binding)
BuildChannelListener<TChannel>(Uri, String, Object[]) BuildChannelListener<TChannel>(Uri, String, Object[]) BuildChannelListener<TChannel>(Uri, String, Object[]) BuildChannelListener<TChannel>(Uri, String, Object[])

在服务上生成通道侦听器,该通道侦听器接受具有指定类型的通道并满足所指定的功能。Builds the channel listener on the service that accepts a specified type of channel and that satisfies the features specified.

(Inherited from Binding)
CanBuildChannelFactory<TChannel>(BindingParameterCollection) CanBuildChannelFactory<TChannel>(BindingParameterCollection) CanBuildChannelFactory<TChannel>(BindingParameterCollection) CanBuildChannelFactory<TChannel>(BindingParameterCollection)

返回一个值,该值指示当前绑定是否可以在客户端上生成满足指定绑定参数集合的通道工厂堆栈。Returns a value that indicates whether the current binding can build a channel factory stack on the client that satisfies the collection of binding parameters specified.

(Inherited from Binding)
CanBuildChannelFactory<TChannel>(Object[]) CanBuildChannelFactory<TChannel>(Object[]) CanBuildChannelFactory<TChannel>(Object[]) CanBuildChannelFactory<TChannel>(Object[])

返回一个值,该值指示当前绑定是否可以在客户端上生成满足对象数组所指定的需求的通道工厂堆栈。Returns a value that indicates whether the current binding can build a channel factory stack on the client that satisfies the requirements specified by an object array.

(Inherited from Binding)
CanBuildChannelListener<TChannel>(BindingParameterCollection) CanBuildChannelListener<TChannel>(BindingParameterCollection) CanBuildChannelListener<TChannel>(BindingParameterCollection) CanBuildChannelListener<TChannel>(BindingParameterCollection)

返回一个值,该值指示当前绑定是否可以在服务上生成满足指定绑定参数集合的通道侦听器堆栈。Returns a value that indicates whether the current binding can build a channel listener stack on the service that satisfies the collection of binding parameters specified.

(Inherited from Binding)
CanBuildChannelListener<TChannel>(Object[]) CanBuildChannelListener<TChannel>(Object[]) CanBuildChannelListener<TChannel>(Object[]) CanBuildChannelListener<TChannel>(Object[])

返回一个值,该值指示当前绑定是否可以在服务上生成满足对象数组所指定的条件的通道侦听器堆栈。Returns a value that indicates whether the current binding can build a channel listener stack on the service that satisfies the criteria specified in an array of objects.

(Inherited from Binding)
CreateBindingElements() CreateBindingElements() CreateBindingElements() CreateBindingElements()

为绑定创建一个绑定元素集合。Creates a collection with the binding elements for the binding.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetProperty<T>(BindingParameterCollection) GetProperty<T>(BindingParameterCollection) GetProperty<T>(BindingParameterCollection) GetProperty<T>(BindingParameterCollection)

从绑定堆栈的适当层返回所请求的类型化对象(如果存在)。Returns a typed object requested, if present, from the appropriate layer in the binding stack.

(Inherited from Binding)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ShouldSerializeName() ShouldSerializeName() ShouldSerializeName() ShouldSerializeName()

返回是否应序列化绑定名称。Returns whether the name of the binding should be serialized.

(Inherited from Binding)
ShouldSerializeNamespace() ShouldSerializeNamespace() ShouldSerializeNamespace() ShouldSerializeNamespace()

返回是否应序列化绑定命名空间。Returns whether the namespace of the binding should be serialized.

(Inherited from Binding)
ShouldSerializeReaderQuotas() ShouldSerializeReaderQuotas() ShouldSerializeReaderQuotas() ShouldSerializeReaderQuotas()

获取一个值,该值指定是否应对绑定的读取器配额数据进行序列化。Gets a value that specifies whether reader quota data for the binding should be serialized.

ShouldSerializeSecurity() ShouldSerializeSecurity() ShouldSerializeSecurity() ShouldSerializeSecurity()

获取一个值,该值指定是否应序列化绑定的安全信息。Gets a value that specifies whether security information for the binding should be serialized.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

显式界面实现

IBindingRuntimePreferences.ReceiveSynchronously IBindingRuntimePreferences.ReceiveSynchronously IBindingRuntimePreferences.ReceiveSynchronously IBindingRuntimePreferences.ReceiveSynchronously

获取一个值,它指示此绑定创建的对等通道上的传入请求是同步处理传入请求还是异步处理。Gets a value that indicates whether incoming requests over peer channels created by this binding are handled synchronously or asynchronously.

适用于