RTC Forums
May 15, 2024, 03:25:18 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: Is it possible to retrieve the Function Progress  (Read 3669 times)
sfarmer
RTC Expired
*
Posts: 9


« 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


« 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


« 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


« 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  
 
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.