RTC Forums
April 28, 2024, 10:51:35 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: client requests sent twice  (Read 3637 times)
mkurnia
RTC Expired
*
Posts: 21


« on: November 16, 2015, 10:02:47 AM »

hi danijel,

how to prevent the client sends a request twice, I accidentally found it. when I press the OK button on the client application, it turns abruptly interrupted connection with the server. then I click the OK button again, and it turns out that the first click is still ongoing. when I click the OK button for the second time it turns out that the client application sent again to the same record. there are two records sent to the server.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: November 16, 2015, 10:11:32 AM »

Requests aren't sent to the Server immediately, but are first placed into a Request Queue, where they will stay until you have a connection open to the Server, so they can be sent out when the Server is accessible. If you want to clear the Request Queue (to make sure there are no requests waiting to be sent), you can use the SkipRequests (does NOT trigger RequestAborted events) or CancelRequests (triggers RequestAborted events for all cancelled requests) method on the TRtcHttpClient component.

Best Regards,
Danijel Tkalcec
Logged
mkurnia
RTC Expired
*
Posts: 21


« Reply #2 on: November 17, 2015, 01:20:19 AM »

Danijel thank you, I've been using suggestions from you. so far successfully used this way.
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.023 seconds with 17 queries.