RTC Forums
November 24, 2024, 04:54:17 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Why the demo of rtc_messenger has two login functions?  (Read 5959 times)
sunstone
RTC License++
*****
Posts: 16


« 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


« 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


« 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


« 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


« Reply #4 on: October 26, 2010, 02:11:38 AM »

 Sad  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


« 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


« 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  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.024 seconds with 16 queries.