using CoreAgent.WebSocketTransport.Models; namespace CoreAgent.WebSocketTransport.Interfaces; /// /// 消息通道管理器接口 /// 单一职责:管理所有消息通道 /// public interface IMessageChannelManager : IDisposable { /// /// 获取发送消息通道 /// IMessageChannel SendChannel { get; } /// /// 获取接收消息通道 /// IMessageChannel ReceiveChannel { get; } /// /// 获取优先级消息通道(用于心跳等) /// IMessageChannel PriorityChannel { get; } /// /// 获取通道状态信息 /// /// 通道状态信息 ChannelStatusInfo GetStatusInfo(); /// /// 清空所有通道 /// void ClearAllChannels(); /// /// 完成所有通道 /// void CompleteAllChannels(); } /// /// 通道状态信息 /// public class ChannelStatusInfo { public int SendChannelCount { get; set; } public int ReceiveChannelCount { get; set; } public int PriorityChannelCount { get; set; } public int SendChannelCapacity { get; set; } public int ReceiveChannelCapacity { get; set; } public int PriorityChannelCapacity { get; set; } public bool SendChannelCompleted { get; set; } public bool ReceiveChannelCompleted { get; set; } public bool PriorityChannelCompleted { get; set; } }