UniGui手动终止一个会话

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;

你可能感兴趣的:(UniGui手动终止一个会话)