C# 클래스 KEngine.KHttpDownloader

多线程+断点续传 http下载器, 注意用完后要Dispose TODO: 线程的回调Callback有点难看,以后弄个KHttpDownloader2(本类稳定就不改本类)
상속: UnityEngine.MonoBehaviour, IDisposable
파일 보기 프로젝트 열기: mr-kelly/KEngine 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Progress float
TotalSize int

공개 메소드들

메소드 설명
Dispose ( ) : void
GetDatas ( ) : byte[]
GetFullSavePath ( string relativePath ) : string
Load ( string fullUrl, string saveFullPath, bool useContinue = false, bool useCache = false, int expireDays = 1, int timeout = 5 ) : KHttpDownloader

Load ( string fullUrl, string saveFullPath, int expireDays, int timeout = 5 ) : KHttpDownloader

비공개 메소드들

메소드 설명
Init ( string fullUrl, string saveFullPath, bool useContinue, bool useCache = false, int expireDays = 1, int timeout = 10 ) : void
KHttpDownloader ( ) : System
OnDestroy ( ) : void
OnFinish ( ) : void
StartDownload ( string fullUrl ) : IEnumerator
ThreadableResumeDownload ( string url, int>.Action stepCallback, System.Action errorCallback, System.Action successCallback ) : void

메소드 상세

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

GetDatas() 공개 메소드

public GetDatas ( ) : byte[]
리턴 byte[]

GetFullSavePath() 공개 정적인 메소드

public static GetFullSavePath ( string relativePath ) : string
relativePath string
리턴 string

Load() 공개 정적인 메소드

public static Load ( string fullUrl, string saveFullPath, bool useContinue = false, bool useCache = false, int expireDays = 1, int timeout = 5 ) : KHttpDownloader
fullUrl string
saveFullPath string 完整的保存路径!
useContinue bool 是否断点续传
useCache bool 如果存在则不下载了!
expireDays int
timeout int
리턴 KHttpDownloader

Load() 공개 정적인 메소드

public static Load ( string fullUrl, string saveFullPath, int expireDays, int timeout = 5 ) : KHttpDownloader
fullUrl string
saveFullPath string
expireDays int
timeout int
리턴 KHttpDownloader

프로퍼티 상세

Progress 공개적으로 프로퍼티

public float Progress
리턴 float

TotalSize 공개적으로 프로퍼티

public int TotalSize
리턴 int