PeerNode PeerNode PeerNode PeerNode Class

定义

定义参与特定对等网格的应用程序所使用的对等节点实例。Defines the instance of a peer node used by an application participating in a specific peer mesh.

public ref class PeerNode sealed : System::ServiceModel::IOnlineStatus
public sealed class PeerNode : System.ServiceModel.IOnlineStatus
type PeerNode = class
    interface IOnlineStatus
Public NotInheritable Class PeerNode
Implements IOnlineStatus
继承
PeerNodePeerNodePeerNodePeerNode
实现

注解

一个对等节点可以在网格中托管多个对等通道,只要它们在为各个通道的绑定所提供的 EndpointAddress 中共享公用的 URI 和主机名。A peer node can host multiple peer channels within the mesh as long as they share a common URI and host name in the EndpointAddress supplied to the binding for each channel.

如果为某个对等节点定义的两个或多个对等通道是使用单独绑定创建的,则所有绑定中的 PortListenIPAddressResolver 属性都必须相同。If two or more peer channels defined for a peer node are created with separate bindings, then the Port, ListenIPAddress, and Resolver properties must be identical on all bindings.

如果在创建第一个通道绑定之后对同一个对等节点实例创建了一个后续通道绑定,则此绑定或后续绑定中的 MaxReceivedMessageSize 属性必须小于或等于第一个通道绑定中设置的 MaxReceivedMessageSize 属性的值。If a subsequent channel binding is created after the first one for the same peer node instance, then the MaxReceivedMessageSize property on this and subsequent bindings must be less than or equal to the value of MaxReceivedMessageSize property as set on the first channel binding.

属性

IsOnline IsOnline IsOnline IsOnline

获取一个值,该值指示对等节点是否联机以及是否能将消息发送给对等网格中的相邻节点。Gets a value indicating whether the peer node is online and able to send messages to neighboring nodes in the peer mesh.

MessagePropagationFilter MessagePropagationFilter MessagePropagationFilter MessagePropagationFilter

获取或设置自定义筛选器,以用于通过对等通道接收的消息。Gets or sets a custom filter for messages received over the peer channel.

Port Port Port Port

获取对等节点所侦听的网络端口。Gets the network port on which the peer node is listening.

方法

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)
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)
RefreshConnection() RefreshConnection() RefreshConnection() RefreshConnection()

刷新与对等网格的连接。Refreshes the connection with the peer mesh.

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

提供对等节点的字符串表示形式。Provides a string representation of a peer node.

事件

Offline Offline Offline Offline

当对等节点在对等网格中进入脱机状态时发出信号。Signals when the peer node goes offline from the peer mesh.

Online Online Online Online

当对等节点在对等网格中进入联机状态时发出信号。Signals when a peer node comes online within the peer mesh.

适用于