UniGui手动终止一个会话

来源:互联网 发布:春运迁徙大数据图 编辑:程序博客网 时间:2024/05/02 04:45
procedure KillSession;var Sessions: TList;    Session: TUniGUISession;    I: Integer;begin    Sessions := UniServerModule.SessionManager.Sessions.SessionList.LockList;    try      for I := 0 to Sessions.Count - 1 do      begin          Session := Sessions[I];          Secao.Lock;          try            if Session.(SessionID/IP/Address) = (????) then //这里可以根据会话id,ip来决定是终止的某个会话              Session.Logout;          finally            Secao.Unlock;          end;      end;    finally      UniServerModule.SessionManager.Sessions.SessionList.UnlockList;    end;end;

原创粉丝点击