RTC Forums
November 23, 2024, 10:01:21 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
Session list
Pages: [
1
]
« previous
next »
Print
Author
Topic: Session list (Read 4575 times)
HelgeLange
RTC Expired
Posts: 100
Session list
«
on:
May 03, 2017, 12:30:15 AM »
Hi Danijel,
short question : is there a session list the server module that I can search through and access the information. I know that I can access the session when a request comes in, but I'd like to access the session list and some information when I need it in the server process.
Thanks, Helge
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Session list
«
Reply #1 on:
May 03, 2017, 05:01:38 AM »
Short answer: There are no methods or functions which would give you access to a list of Sessions.
Long answer: Even though you can check if a Session exists (if you know the Session ID) by using the HaveSession method and lock the Session for read/write access using the FindSession method (both accessible from any TRtcDataServer component descendant), you should ONLY use the FindSession method from events triggered by the Client owning the Session.
When a Session is locked for access, the Session object is moved from the internal Session list to the TRtcDataServer descendant component (where the FindSession method was called) and can NOT be accessed from any other place (FindSession would return FALSE, while HaveSession returns TRUE) until the Session is unlocked again.
If you need to access some user data from other threads (not by Clients owning each Session), you should store that data in a separate data structure (your own objects).
Best Regards,
Danijel Tkalcec
Logged
HelgeLange
RTC Expired
Posts: 100
Re: Session list
«
Reply #2 on:
May 03, 2017, 03:05:52 PM »
OK, thanks... Not what I wanted to hear, but it is what it is
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...