- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi Unigui获取连接的客户端列表
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;
https://blog.csdn.net/shuiying/article/details/8967738