using System;
using NBC.Async;
using NBC.Network;
using NBC.PacketParser.Interface;
#if FANTASY_NET
using System.Text;
using Fantasy.Network.Interface;
using Fantasy.Network.Route;
using Fantasy.PacketParser;
using Fantasy.Helper;
using Fantasy.InnerMessage;
using Fantasy.Roaming;
#endif

#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

// ReSharper disable ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract

namespace NBC.Scheduler
{
    /// <summary>
    /// 提供了一个机制来调度和处理外部网络消息。
    /// </summary>
    public sealed class OuterMessageScheduler : ANetworkMessageScheduler
    {
        public OuterMessageScheduler(Scene scene) : base(scene) { }
        
        /// <summary>
        /// 在Unity环境下，处理外部消息的方法。
        /// </summary>
        /// <param name="session">网络会话。</param>
        /// <param name="packInfo">消息封包信息。</param>
        public override FTask Scheduler(Session session, APackInfo packInfo)
        {
            throw new NotSupportedException($"Received unsupported message protocolCode:{packInfo.ProtocolCode}");
        }
    }
}