RTC Forums
November 24, 2024, 02:12:52 AM
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
>
Know when a server function wasn't called for any reason
Pages: [
1
]
« previous
next »
Print
Author
Topic: Know when a server function wasn't called for any reason (Read 4405 times)
HelgeLange
RTC Expired
Posts: 100
Know when a server function wasn't called for any reason
«
on:
October 20, 2015, 03:27:26 PM »
Hi Danijel,
I'm trying to make sure that from a mobile phone all communications go through. I know that there is a repost count property, that allows me to try several times. But it is entirely possible for a mobile phone to be offline for minutes and more while driving for example.
Is there any way to make sure that the messages leaves anyway as soon as we're online again?
The option I have would be a message stack with an unique Id that will be sent with every message and when I get the result, I clear that message from the stack. While I don't get any answer I try again every 10 seconds or so...
Any ideas ?
Thanks in advance, Helge
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Know when a server function wasn't called for any reason
«
Reply #1 on:
October 20, 2015, 03:57:28 PM »
If you only want the TRtcClientModule component to keep trying unlimited number of times, the simplest solution is to set the
AutoRepost
property to
-1
. Then, the TRtcClientModule component will try sending each function call over-and-over-again, until it gets to the Server and a Result is received. This obviously won't work if your App closes before all remote calls have been sent out, but it does provide you with a simple "queue" which is handled by the RTC component.
If you want to implement your own mechanism for "receip acknowledgment" instead, to make sure that all your remote calls get through to the Server (which is something the components can not guarantee), you should set the
AutoRepost
property to the number of automatic repost attempts you want the components to make for you (but not to
-1
, which means "unlimited") and implement the "RequestAborted" event on the TRtcResult component (triggered on the component used for handling the Result) or the
OnResponseAbort
event on the TRtcClientModule component (triggered for all remote calls made with the Client Module) to handle all "aborted" remote function calls. A remote function call will be "aborted" if the last remote function call attempt failed and no further attempts will be made.
Best Regards,
Danijel Tkalcec
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...