erich.wanker Posted July 25, 2017 Share Posted July 25, 2017 Hello, how can i start a procedure in other session? i can change a string-value of a other session with following code, and every 2 minutes (uniTimer) i test, if the value has changed - but i want to do this without timer ???? i send ( starts a new session.. ) a parameter ... myuniGUI.dll?write_to_session=handy_user_id&value=handy_name begin // Suche Session und starte Suche ASessionList := UniServerModule.SessionManager.Sessions.SessionList; // .SessionList. ist;// .LockList; try for I := 0 to ASessionList.Count -1 do begin USession := TUniGUISession(ASessionList[i]); M := USession.UniMainModule as TUniMainModule; if UniApplication.UniSession.SessionID <> USession.SessionId then // Do not close my OWN Session begin if M.benutzernummer = handy_user_id then begin M.syn_name :=handy_name; end; end; end; finally uniapplication.terminate; // UniServerModule.SessionManager.Sessions.SessionList.UnlockList; end; end; i tried to create a public procedure in uniMainModule and tried to handle it like above code ( handy_user_id and handy_name are public variables in uniMainModule..) - but doenst work... Any ideas what i can do? Erich Link to comment Share on other sites More sharing options...
Oliver Morsch Posted July 26, 2017 Share Posted July 26, 2017 but i want to do this without timer ???? You have to use "web sockets" or "long polling". Edit: In your example you should use ".LockList" / ".UnLockList" Link to comment Share on other sites More sharing options...
aristeo Posted July 30, 2017 Share Posted July 30, 2017 I'm using http://www.esegece.com/websockets/ For websockets and works perfectly Enviado desde mi Nexus 5X mediante Tapatalk Link to comment Share on other sites More sharing options...
albertovesx Posted July 31, 2017 Share Posted July 31, 2017 I'm using http://www.esegece.com/websockets/ For websockets and works perfectly Enviado desde mi Nexus 5X mediante Tapatalk Can you help us with a simple example? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now