Unigui獲取連接的客戶端列表

var
  I : Integer;
  ASessionList: TList;
  ASession : TUniGUISession;
begin
  memo1.Clear;
  ASessionList:=UniServerModule.SessionManager.Sessions.SessionList.LockList;
  try
        for I := 0 to ASessionList.Count-1 do
        begin
        ASession := TUniGUISession(ASessionList[I]);
        if not ASession.IsTerminated then
          memo1.Lines.Add( ASession.UniApplication.RemoteAddress );
        end;
  finally
        UniServerModule.SessionManager.Sessions.SessionList.UnlockList;
  end;
end;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章