Jump to content

About Session question?


bettersoft

Recommended Posts

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;

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