2014-03-03 3 views
1

i 파일을 HTTP 서버에 업로드합니다.iOS NSUrlConnection 업로드 속도 확인

- (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite 

업로드 프로그람을 얻을 수는 있지만 업로드 속도를 얻는 방법은 있습니까?

답변

3

question에서 다운로드 속도가 빠르지 만 답변을 얻었지만 업로드 속도를 계산할 수도 있습니다. 업로드 된 바이트의 차이와 델리게이트에 대한 호출 시간의 차이를 측정하면 초당 바이트 수 (또는 다른 시간 단위)로 진행 속도를 계산할 수 있습니다.

당신을 도울 수있는 another answer가 있습니다. One more reference (의견에서 추가) 이 도움이

희망 ... :)

+0

하나 이상의 참조 http://stackoverflow.com/questions/2779600/how-to-estimate-download-time-remaining-accurately – vokilam

+0

@vokilam >> 편집. 감사 .. :) – Rashad