IBackgroundCopyJob4::SetPeerCachingFlags method (bits3_0.h)
Sets flags that determine if the files of the job can be cached and served to peers and if the job can download content from peers.
Syntax
HRESULT SetPeerCachingFlags(
[in] DWORD Flags
);
Parameters
[in] Flags
Flags that determine if the files of the job can be cached and served to peers and if the job can download content from peers. The following flags can be set:
Value | Meaning |
---|---|
|
The job can download content from peers.
The job will not download from a peer unless both the client computer and the job allow Background Intelligent Transfer Service (BITS) to download files from a peer. To enable the client computer to download files from a peer, set the EnablePeerCaching group policy or call the IBitsPeerCacheAdministration::SetConfigurationFlags method and set the BG_ENABLE_PEERCACHING_CLIENT flag. If one of the following conditions exists, BITS will stop the download and reschedule the job to begin transferring from either a peer or the origin server, depending on the value for the job and the cache:
|
|
The files of the job can be cached and served to peers.
BITS will not cache the files and serve them to peers unless both the client computer and job allow BITS to cache and serve the files. To allow BITS to cache and serve the files on the client computer, set the EnablePeerCaching group policy or call the IBitsPeerCacheAdministration::SetConfigurationFlags method and set the BG_ENABLE_PEERCACHING_SERVER flag.BITS 4.0: This flag is deprecated. |
|
BITS will not use Windows BranchCache for transfer jobs. This setting does not affect the use of Windows BranchCache by applications other than BITS. |
Return value
The method returns the following values.
Return code | Description |
---|---|
|
Success |
Remarks
Setting these flags has meaning only if the peer caching has been enabled by either setting the EnablePeerCaching group policy or calling the IBitsPeerCacheAdministration::SetConfigurationFlags.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | bits3_0.h (include Bits.h) |
Library | Bits.lib |