RTC Forums
November 24, 2024, 03:13:02 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
>
Is it possible to retrieve the Function Progress
Pages: [
1
]
« previous
next »
Print
Author
Topic: Is it possible to retrieve the Function Progress (Read 4589 times)
sfarmer
RTC Expired
Posts: 9
Is it possible to retrieve the Function Progress
«
on:
February 06, 2014, 07:55:21 AM »
Hi,
I have written an simple app the runs a function over TRtcHTTPServer. The function returns a stream of variable size. Under normal conditions this is instant but when run on a mobile over the mobile network this can be slow.
Is there anyway of retrieve the amount of bytes recieved and the total amount of bytes to transfer. I would like to display some sort of progress bar.
Thanks
Simon
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Is it possible to retrieve the Function Progress
«
Reply #1 on:
February 06, 2014, 09:18:17 AM »
Not when using RTC Remote functions. If you want to send large amounts of data, you can use the TRtcDataProvider component on the Server and TRTcDataRequest component on the Client. That will give you full control over the sending and receiving process.
Best Regards,
Danijel Tkalcec
Logged
sfarmer
RTC Expired
Posts: 9
Re: Is it possible to retrieve the Function Progress
«
Reply #2 on:
February 06, 2014, 09:53:31 AM »
So if I use a TRtcDataProvider in the client, which event do I use to get the amount of data transfered and to transfer?
Thanks
Simon
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Is it possible to retrieve the Function Progress
«
Reply #3 on:
February 06, 2014, 12:28:32 PM »
Use the OnDataReceived and OnDataSent events. Request and Response properties on the TRtcDataClient and TRtcDataServer components have ContentLength and ContentIn / ContentOut parameters, which tell you how much data is there and how much came in/out.
Check file upload and download examples in the Quick Start guide.
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...