You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
445 B
27 lines
445 B
/*
|
|
Sog 游戏基础库
|
|
2016 by zouwei
|
|
*/
|
|
|
|
using System;
|
|
using System.Threading;
|
|
|
|
namespace Sog
|
|
{
|
|
public static class SessionIDUtil
|
|
{
|
|
private static int m_iSessionID = 0;
|
|
|
|
|
|
public static uint GenID()
|
|
{
|
|
m_iSessionID++;
|
|
//24 bit
|
|
if(m_iSessionID >= 10000000)
|
|
{
|
|
m_iSessionID = 1;
|
|
}
|
|
return (uint)m_iSessionID;
|
|
}
|
|
}
|
|
}
|
|
|