TcpClientChannel.ChannelPriority 属性

定义

获取当前信道的优先级。

public:
 property int ChannelPriority { int get(); };
public int ChannelPriority { get; }
member this.ChannelPriority : int
Public ReadOnly Property ChannelPriority As Integer

属性值

一个整数,表示分配给该信道的优先级。

实现

示例

下面的代码示例演示如何使用此属性。

// Show the name and priority of the channel.
Console::WriteLine( "Channel Name: {0}", clientChannel->ChannelName );
Console::WriteLine( "Channel Priority: {0}", clientChannel->ChannelPriority );
// Show the name and priority of the channel.
Console.WriteLine("Channel Name: {0}", clientChannel.ChannelName);
Console.WriteLine("Channel Priority: {0}", clientChannel.ChannelPriority);

注解

优先级控制竞争客户端连接到给定终结点的顺序;优先级较高的通道在低优先级通道之前连接。 默认优先级为 1;允许负优先级。

适用于