Webhttpbinding supports two stream transmission and cache modes. to download files, you must select the stream transmission mode. Otherwise, all files must be loaded into the memory before being sent out, it not only occupies a large amount of memory overhead, but also affects the speed of sending responses. The problem is that the transfer-encoding: chunked method is automatically used in streaming. In this way, the length of the client file is not notified. Even if the message header is set on my server, the client cannot get the length, as a result, the client assumes that my server does not support resumable data transfer, or even multi-threaded data download. Unless you develop a download software, the traditional download software is not supported, but nettransport can still try to send the resume command without knowing whether it can be resumed. This is the most user-friendly software.
There is only one way to consider it. It is to transform the cache mode of webhttpbinding. The cache mode is a traditional HTTP response, and can be set for all kinds of HTTP headers. resumable data transfer is a natural process, multi-thread transmission can be used. The problem to be solved is that the message is written, and the message cannot be written to the cache. Instead, the message is obtained from the stream in real time (if the returned Stream object is a stream object ).
The research direction is determined. Let's see if a webhttpbinding similar binding class can be successfully customized. To be continued ......