Jump to content

Recommended Posts

Posted

Is it possible to get a list of connected clients ( IP/SessionId )

and eventually "kill" one of the sessions ?

 

 

try

 

http://forums.unigui.com/index.php?/topic/1290-sessions/page__p__8766__hl__session__fromsearch__1#entry8766

 

 

or

 

procedure TMainForm.UniBitBtn1Click(Sender: TObject);
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;

  • 8 years later...
  • 3 years later...
Posted

The unlock has been removed and the information is displayed

procedure TFMENU.UniButton6Click(Sender: TObject);
var
 I: Integer;
 ASessionList: TList;
begin
 ASessionList := UniServerModule.SessionManager.Sessions.SessionList;
 try
   for I := 0 to ASessionList.Count - 1 do
   begin
     UniMemo_IPConectadas.Lines.Add(TUniGUISession(ASessionList[i]).UniApplication.RemoteAddress);

   end;
 finally
   //UniServerModule.SessionManager.Sessions.SessionList ;
 end;
end;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...