摘要
传统的附件上传机制虽然能保证准确将文件从客户端上传至服务器,但对大文件来说,网络不稳定时,为了实现断点续传,常会因主线程资源占用过多而导致UI停止响应。该文基于.NET环境和Web服务提出并实现了一种多线程上传附件的算法,在实现断点续传的基础上,又能对资源进行合理调度,从而保证了上传的速度、精度和及时的UI响应。
Traditional file uploading mechanism enables accurate uploading process from client to server,but as for the bigger file,in order to resume from break point(RFBP) especially when the network is unstable,it often leads to temporary stuck in UI response because of occupying of the main thread is too much.This article purposes and implements a multi-threaded uploading algorithm based on.NET platform and Web Service,which can not only implement RFBP,but schedule the system resources reasonably and thereby ensures the uploading speed,accuracy and the timeliness of UI response.
出处
《电脑知识与技术(过刊)》
2015年第11X期192-193,196,共3页
Computer Knowledge and Technology
基金
2015年北京市大学生科学研究与创业行动计划项目
2015年优秀青年教师培养计划项目(XN132)
关键词
多线程
上传附件
WEB服务
断点续传
Multi-threaded
Uploading file
Web Service
Resume from break point