KSYHTTPProxyService Class Reference

Inherits from NSObject
Declared in KSYHTTPProxyService.h

  ignoreURLParamter

设置是否忽略http url参数,YES时对于参数不用的URL作为同一个文件处理,为NO时当做不同文件处理

@property (nonatomic, assign) BOOL ignoreURLParamter

Availability

Available in KSYHTTPCache 1.2.2 and later.

Declared In

KSYHTTPProxyService.h

+ getVersion

获取版本号

+ (NSString *)getVersion

Declared In

KSYHTTPProxyService.h

+ sharedInstance

获取唯一示例

+ (KSYHTTPProxyService *)sharedInstance

Declared In

KSYHTTPProxyService.h

– setCacheRoot:

设置缓存区位置

- (void)setCacheRoot:(NSString *)cacheRoot

Declared In

KSYHTTPProxyService.h

– cacheRoot

查询缓存区位置

- (NSString *)cacheRoot

Declared In

KSYHTTPProxyService.h

– getCacheStrategy

查询当前缓存策略,0代表限制缓存区总大小,1代表限制缓存区文件个数

- (NSInteger)getCacheStrategy

Declared In

KSYHTTPProxyService.h

– setMaxCacheSizeLimited:

设置缓存区文件总大小限制

- (void)setMaxCacheSizeLimited:(long long)maxCacheSize

Declared In

KSYHTTPProxyService.h

– maxCacheSize

查询缓存区最大大小

- (long long)maxCacheSize

Declared In

KSYHTTPProxyService.h

– setMaxFilesCountLimited:

设置缓存区文件总个数限制

- (void)setMaxFilesCountLimited:(NSInteger)maxFilesCount

Declared In

KSYHTTPProxyService.h

– maxFilesCount

查询缓存区最大文件个数

- (NSInteger)maxFilesCount

Declared In

KSYHTTPProxyService.h

– setMaxSingleFileSize:

设置单个文件大小限制,超过该大小的文件将不被缓存。 默认大小为500M

- (void)setMaxSingleFileSize:(long long)maxSingleFileSize

Declared In

KSYHTTPProxyService.h

– setDisableCache:

设置单个文件大小限制,超过该大小的文件将不被缓存。 默认大小为500M

- (void)setDisableCache:(BOOL)disableCache

Declared In

KSYHTTPProxyService.h

– startServer

启动server

- (BOOL)startServer

Declared In

KSYHTTPProxyService.h

– stopServer

关闭server

- (void)stopServer

Declared In

KSYHTTPProxyService.h

– isRunning

查询server是否在运行状态

- (BOOL)isRunning

Declared In

KSYHTTPProxyService.h

– getProxyUrl:

获取代理后的播放地址

- (NSString *)getProxyUrl:(NSString *)url

Declared In

KSYHTTPProxyService.h

– getOriginalUrl:

获取原始播放地址

- (NSString *)getOriginalUrl:(NSString *)url

Declared In

KSYHTTPProxyService.h

– getProxyUrl:newCache:

获取代理后的播放地址

- (NSString *)getProxyUrl:(NSString *)url newCache:(BOOL)newCache

Declared In

KSYHTTPProxyService.h

– deleteAllCachesWithError:

删除缓存区所以文件

- (void)deleteAllCachesWithError:(NSError **)error

Declared In

KSYHTTPProxyService.h

– deleteCacheForUrl:error:

删除某个url对应的缓存文件

- (void)deleteCacheForUrl:(NSURL *)url error:(NSError **)error

Declared In

KSYHTTPProxyService.h

– isCacheCompleteForUrl:

查询某个url缓存是否完成

- (BOOL)isCacheCompleteForUrl:(NSURL *)url

Declared In

KSYHTTPProxyService.h

– getAllCachedFileListWithError:

获得缓存已完成文件列表 返回的数组元素为NSDictionay, 包含为url和文件路径

- (NSArray *)getAllCachedFileListWithError:(NSError **)errors

Declared In

KSYHTTPProxyService.h

– getAllCachingFileListWithError:

获得缓存未完成文件列表 返回的数组元素为NSDictionay, 包含url、文件路径、content length、cache fragments

- (NSArray *)getAllCachingFileListWithError:(NSError **)error

Declared In

KSYHTTPProxyService.h

– getCachedFilePathForUrl:

获得url对应缓存文件的路径

- (NSString *)getCachedFilePathForUrl:(NSURL *)url

Declared In

KSYHTTPProxyService.h

– getCacheFragmentForUrl:error:

获得url对应缓存未完成url对应的cache fragment

- (NSArray *)getCacheFragmentForUrl:(NSURL *)url error:(NSError **)error

Declared In

KSYHTTPProxyService.h

– setHttpHeaders:

发送http请求时需要header带上的字段 必须 key:value 都是NSString类型

- (void)setHttpHeaders:(NSDictionary<NSString*,NSString*> *)headers

Parameters

headers

请求头带的字段

Declared In

KSYHTTPProxyService.h