Ejemplo n.º 1
0
 public GameSession(Socket s,TcpServer tcpserver = null)
 {
     server = tcpserver;
     m_Socket = s;
     m_GamePack = new GamePack();
     m_nLastTime = System.Environment.TickCount;
     gameid = IDManager.CreateGameId();
 }
Ejemplo n.º 2
0
 public uint gameid;     //有玩家对象才会赋值
 public GameSession(Socket s, TcpServer tcpserver = null)
 {
     server      = tcpserver;
     m_Socket    = s;
     m_GamePack  = new GamePack();
     m_nLastTime = System.Environment.TickCount;
     gameid      = IDManager.CreateGameId();
 }
Ejemplo n.º 3
0
 public void Dispose()
 {
     server = null;
     if (m_Socket != null && m_Socket.Connected)
     {
         m_Socket.Close();
         m_Socket.Dispose();
     }
     m_Socket = null;
     m_GamePack = null;
 }
Ejemplo n.º 4
0
 public void Dispose()
 {
     server = null;
     if (m_Socket != null && m_Socket.Connected)
     {
         m_Socket.Close();
         m_Socket.Dispose();
     }
     m_Socket   = null;
     m_GamePack = null;
 }