first commit
This commit is contained in:
24
MMOTestServer/ServerLib/Service/SessionManager.cs
Normal file
24
MMOTestServer/ServerLib/Service/SessionManager.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace ServerLib.Service;
|
||||
|
||||
public class SessionManager
|
||||
{
|
||||
public Dictionary<int, Session> Sessions
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public SessionManager()
|
||||
{
|
||||
Sessions = new Dictionary<int, Session>();
|
||||
}
|
||||
|
||||
public void AddSession(Session session)
|
||||
{
|
||||
Sessions.Add(session.GetHashCode(), session);
|
||||
}
|
||||
|
||||
public void RemoveSession(Session session)
|
||||
{
|
||||
Sessions.Remove(session.GetHashCode());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user