xrtHttpCacheFragmentInputInit
初始化尚未收到 Header 或正文的片段输入。
void xrtHttpCacheFragmentInputInit( xhttpcachefragmentinput* pInput );
| 参数 | 说明 |
|---|---|
| xhttpcachefragmentinput* pInput | 输入 |
返回:初始化尚未收到 Header 或正文的片段输入。
示例已编译验证
httpcachefragmentinputinit obj; xrtHttpCacheFragmentInputInit(&obj, pInput);
xrtHttpCacheFragmentPlan
XRT_API xhttpcachefragmentdecision xrtHttpCacheFragmentPlan( const xhttpcachefragmentinput* pInput, xhttpcachefragmentplan* pPlan );
;
返回:XRT_API xhttpcachefragmentdecision xrtHttpCacheFragmentPlan( const xhttpcachefragmentinput* pInput, xhttpcachefragmentplan* pPlan );
示例已编译验证
/* XRT_API xhttpcachefragmentdecision xrtHttpCacheFragmentPlan( const xhttpcachefragmentinput* pInput, xhttpcachefragmentplan* pPlan ); */ result = xrtHttpCacheFragmentPlan();
xrtHttpCacheFragmentValid
判断公开片段的 Header、区间、完整长度和 partial 标志是否自洽。
bool xrtHttpCacheFragmentValid( const xhttpcachefragment* pFragment );
| 参数 | 说明 |
|---|---|
| const xhttpcachefragment* pFragment | URL 片段 |
返回:判断公开片段的 Header、区间、完整长度和 partial 标志是否自洽。
示例已编译验证
/* 判断公开片段的 Header、区间、完整长度和 partial 标志是否自洽。 */ result = xrtHttpCacheFragmentValid(pFragment);
xrtHttpCacheFragmentComplete
判断片段是否已经覆盖完整表示,包括长度为零的空表示。
bool xrtHttpCacheFragmentComplete( const xhttpcachefragment* pFragment );
| 参数 | 说明 |
|---|---|
| const xhttpcachefragment* pFragment | URL 片段 |
返回:判断片段是否已经覆盖完整表示,包括长度为零的空表示。
示例已编译验证
/* 判断片段是否已经覆盖完整表示,包括长度为零的空表示。 */ result = xrtHttpCacheFragmentComplete(pFragment);
xrtHttpCacheCoverageValid
判断规范覆盖集的排序、相邻合并和完整长度约束是否成立。
bool xrtHttpCacheCoverageValid( const xhttpcachecoverage* pCoverage );
| 参数 | 说明 |
|---|---|
| const xhttpcachecoverage* pCoverage | Coverage 参数 |
返回:判断规范覆盖集的排序、相邻合并和完整长度约束是否成立。
示例已编译验证
/* 判断规范覆盖集的排序、相邻合并和完整长度约束是否成立。 */ result = xrtHttpCacheCoverageValid(pCoverage);
xrtHttpCacheCoverageCovers
判断一个闭区间是否完全位于覆盖集中。
xhttpcachecoverageresult xrtHttpCacheCoverageCovers( const xhttpcachecoverage* pCoverage, const xhttpbyterange* pRange );
| 参数 | 说明 |
|---|---|
| const xhttpcachecoverage* pCoverage | Coverage 参数 |
| const xhttpbyterange* pRange | Range 参数 |
返回:判断一个闭区间是否完全位于覆盖集中。
示例已编译验证
/* 判断一个闭区间是否完全位于覆盖集中。 */ result = xrtHttpCacheCoverageCovers(pCoverage, pRange);
xrtHttpCacheMissingCursorInit
初始化可以重复使用的缺口游标。
void xrtHttpCacheMissingCursorInit( xhttpcachemissingcursor* pCursor );
| 参数 | 说明 |
|---|---|
| xhttpcachemissingcursor* pCursor | 游标 |
返回:初始化可以重复使用的缺口游标。
示例已编译验证
httpcachemissingcursorinit obj; xrtHttpCacheMissingCursorInit(&obj, pCursor);
xrtHttpCacheMissingNext
XRT_API xhttpnext xrtHttpCacheMissingNext( const xhttpcachecoverage* pCoverage, const xhttpbyterange* pTarget, xhttpcachemissingcursor* pCursor, xhttpbyterange* pMissing );
;
返回:XRT_API xhttpnext xrtHttpCacheMissingNext( const xhttpcachecoverage* pCoverage, const xhttpbyterange* pTarget, xhttpcachemissingcursor* pCursor, xhttpbyterange* pMissing );
示例已编译验证
/* XRT_API xhttpnext xrtHttpCacheMissingNext( const xhttpcachecoverage* pCoverage, const xhttpbyterange* pTarget, xhttpcachemissingcursor* pCursor, xhttpbyterange* pMissing ); */ result = xrtHttpCacheMissingNext();
xrtHttpCacheCombinePlan
XRT_API xhttpcachecombinedecision xrtHttpCacheCombinePlan( const xhttpcachefragment* pStored, size_t iCount, const xhttpcachefragment* pIncoming, xhttpcachecombineplan* pPlan );
;
返回:XRT_API xhttpcachecombinedecision xrtHttpCacheCombinePlan( const xhttpcachefragment* pStored, size_t iCount, const xhttpcachefragment* pIncoming, xhttpcachecombineplan* pPlan );
示例已编译验证
/* XRT_API xhttpcachecombinedecision xrtHttpCacheCombinePlan( const xhttpcachefragment* pStored, size_t iCount, const xhttpcachefragment* pIncoming, xhttpcachecombineplan* pPlan ); */ result = xrtHttpCacheCombinePlan();