Title: Partial Download from RtcHTTPServer->DataProvider Post by: nmgoza on July 30, 2012, 02:38:57 PM I am currently able to use DataRequest and DataProvider objects. DataRequest requests required files and DataProvider responds by supplying requested files. My question relates to a scenario where there is a loss in connection.What can be suggested as a way of continuing from last Written part of the file.After re-requesting the file,what can be suggested as a way of telling the Servers DataProvider that I only request data from the last written bytes?
Hope my question makes sense. Title: Re: Partial Download from RtcHTTPServer->DataProvider Post by: D.Tkalcec (RTC) on July 30, 2012, 02:59:09 PM This is usually done by utilizing the "Range" (Request) and "Content-Range" (Response) HTTP header. Client will set the "Range" HTTP header to let the Server know what part of the file it wants to download, and the Server will use the "Content-Range" HTTP header to let the Client know what part of the file is being returned.
Naturally, it is not enough to simply set these HTTP headers. You also need to implement your DataProvider and DataRequest events to read and write file parts accordingly. For example, the RTC WebServer Demo uses "Range" and "Content-Range" HTTP headers to allow file download resuming. Open the "rtcFileProvider.pas" unit and search for 'RANGE' and 'Content-Range' to find the corresponding implementations for the Server side. For a detailed definition of the "Range", "Content-Range" and other HTTP header fields, please visit: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html Best Regards, Danijel Tkalcec Title: Re: Partial Download from RtcHTTPServer->DataProvider Post by: nmgoza on August 07, 2012, 04:02:31 PM Thank You very very much...will action as recommended.
|