RTC Forums
November 27, 2024, 10:13:41 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
>
Why the demo of rtc_messenger has two login functions?
Pages: [
1
]
« previous
next »
Print
Author
Topic: Why the demo of rtc_messenger has two login functions? (Read 6085 times)
sunstone
RTC License++
Posts: 16
Why the demo of rtc_messenger has two login functions?
«
on:
October 25, 2010, 03:49:14 AM »
Dear,
The demo of rtc_messenger has login and login2. Why?
Could you explain the function of login2 ?
Thanks,
Sunstone
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Why the demo of rtc_messenger has two login functions?
«
Reply #1 on:
October 25, 2010, 07:49:40 AM »
Each client uses 2 physical connections and the 2nd login function is for the 2nd connection (the one periodically polling the data from the server).
Best Regards,
Danijel Tkalcec
Logged
sunstone
RTC License++
Posts: 16
Re: Why the demo of rtc_messenger has two login functions?
«
Reply #2 on:
October 25, 2010, 09:27:09 AM »
Why not use only one login function (user login and get data)?
Can the Login and Login2 be combined?
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Why the demo of rtc_messenger has two login functions?
«
Reply #3 on:
October 25, 2010, 06:50:02 PM »
You should NOT look at RTC Demos as "the only" way to implement something, neither should you see the Demos as "the best solution" to a particular problem. These are ONLY example projects which demonstrate one *possible* way of using the RTC SDK.
In other words, you can implement this and a lot of other things in a lot of different ways, if you spend enough time with the code and know how to use the RTC SDK.
Best Regards,
Danijel Tkalcec
Logged
sunstone
RTC License++
Posts: 16
Re: Why the demo of rtc_messenger has two login functions?
«
Reply #4 on:
October 26, 2010, 02:11:38 AM »
Could I use one TRtcClientModule for user logon and getting datas?
How do you think to use two TRtcClientModule? More fast or nonblocking?
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Why the demo of rtc_messenger has two login functions?
«
Reply #5 on:
October 26, 2010, 02:21:02 AM »
If one connection is used with TRtcDelayedCalls on the Server side, you will need a 2nd connection to be able to send requests to the Server while waiting for data on the 1st connection. This is why the RTC Messenger Client uses 2 connections and 2 TRtcClientModule components.
You *could* change the RTC Messenger Server implementation to NOT use TRtcDelayedCalls on the Server and then use only 1 TRtcClientModule and 1 TRtcHttpClient component on each Client, but then you would need to send polling requests using a timer and not immediately after receiving each request (as it is done now) and Clients would NOT be notified about received messages immediately, but only in the intervals you specify in the timer used to send polling requests.
Best Regards,
Danijel Tkalcec
Logged
sunstone
RTC License++
Posts: 16
Re: Why the demo of rtc_messenger has two login functions?
«
Reply #6 on:
October 26, 2010, 03:39:24 AM »
:)Now I understand the reason. Thanks for your Patiently explanation.
Hope RTC getting better!
Best regards,
Sunstone
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...