using System.Threading;
using MrWu.Debug;

namespace Server.Net
{
    public static class NetServices
    {
        //private static long idGenerator;

        // 防止与内网进程号的ChannelId冲突，所以设置为一个大的随机数
        private static long acceptIdGenerator = long.MinValue;
        
        public static long CreateAcceptChannelId()
        {
            long value = Interlocked.Increment(ref acceptIdGenerator);
            //Debug.Info($"得到Value:{value}");
            return value;
        }
    }
}