Title: Is it possible to retrieve the Function Progress Post by: sfarmer 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 Title: Re: Is it possible to retrieve the Function Progress Post by: D.Tkalcec (RTC) 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 Title: Re: Is it possible to retrieve the Function Progress Post by: sfarmer 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 Title: Re: Is it possible to retrieve the Function Progress Post by: D.Tkalcec (RTC) 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 |