Jump to content

About Users, Connections, Sessions, etc ..


alasoft

Recommended Posts

If somebody can guide me about this:

 


  •  
  • How to check how many users are connected to some UniGUI Application (can I check user IP ?)
  • How to reject 'one more' connection (for example to allow up to say .. 100 connections, but no more)
  • When a 'session timeout' happens .. does fire some event ? (to control 'abnormal' exit)
  • It's possible to redirect some incoming connection from one UniGUI Application to another ?
     

I humbly request some guidance (while I'll trying to answer some of these by myself, of course :-)) .. thanks !!

 

Rober

Link to comment
Share on other sites

  • 3 weeks later...

[*]How to check how many users are connected to some UniGUI Application (can I check user IP ?)

 

 

procedure TMainForm.UniButton1Click(Sender: TObject);
var
 I: Integer;
 ASessionList: TList;
begin
 ASessionList := UniServerModule.SessionManager.Sessions.SessionList.LockList;
 try
   for I := 0 to ASessionList.Count - 1 do
   begin
     UniMemo1.Lines.Add(TUniGUISession(ASessionList[i]).UniApplication.RemoteAddress);
   end;
 finally
   UniServerModule.SessionManager.Sessions.SessionList.UnlockList;
 end;
end;

 

[*]When a 'session timeout' happens .. does fire some event ? (to control 'abnormal' exit)

 

You can use UniMainModule.OnSessionTimeout and ExtendTimeOut to extend session for another xxx seconds

Link to comment
Share on other sites

You can use UniMainModule.OnSessionTimeout and ExtendTimeOut to extend session for another xxx seconds

 

 

UniMainModule.OnSessionTimeout did not work for me in the "near" past while there was a ADO Proc running. To avoid that I had to use threads for calling ADO Proc and do some refreshing in the interface using unitimer.

Link to comment
Share on other sites

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...