bettersoft Posted May 23, 2011 Share Posted May 23, 2011 How to realize a computer can only open a session? Also is a Client machine can only have an active session. thank. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 23, 2011 Administrators Share Posted May 23, 2011 How to realize a computer can only open a session? You mean restricting a client (IP Address) to only one session? Also is a Client machine can only have an active session.thank. Quote Link to comment Share on other sites More sharing options...
bettersoft Posted May 23, 2011 Author Share Posted May 23, 2011 yes. Also is a client IP address can only open a session, prevent a client IP additional browser window to open multiple session. Quote Link to comment Share on other sites More sharing options...
bettersoft Posted May 23, 2011 Author Share Posted May 23, 2011 function TUniMainModule.UniCancelSession(sIP,sNotSessionID:string):integer; var ASessionList: TList; I:integer; begin Result :=0; ASessionList:=UniServerModule.SessionManager.Sessions.SessionList.LockList; try for I := 0 to ASessionList.Count-1 do begin if sIP =TUniGUISession(ASessionList).UniApplication.RemoteAddress then if TUniGUISession(ASessionList).SessionID <> sNotSessionID then begin TUniGUISession(ASessionList).UniMainModule.Terminate; TUniGUISession(ASessionList).UniApplication.Terminate; Break; end; // TUniGUISession(ASessionList).UniApplication. end; finally UniServerModule.SessionManager.Sessions.SessionList.UnlockList; end; end; Quote Link to comment Share on other sites More sharing options...
bettersoft Posted May 23, 2011 Author Share Posted May 23, 2011 Or just keep the first time open session, a client IP and then opens, is not allow to open session. Until the first time open session release. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 23, 2011 Administrators Share Posted May 23, 2011 Logged as #1003 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.