Files
hjha-server/ServerCore/NetWork/NetServices.cs
xiaoou e9616125ce feat: initial commit - HJHA game server full source
6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) +
game logic (GameFix/GameDAL/ServerData) +
network layer (NetWorkMessage) +
data layer (ObjectModel) +
utilities (MrWu/Core/Config/CloudAPI/dll) +
adapters (zyxAdapter/base)

.NET 8.0 C# solution, 16 projects, 958 source files
2026-07-07 12:02:15 +08:00

20 lines
564 B
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
}
}
}