多个同时上传到单个目的地 [英] Multiple Simultaneous Uploading to single destination

查看:86
本文介绍了多个同时上传到单个目的地的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功创建了一个允许我进行异步文件上传的类。因此,我可以管理多个上传。我发现,如果我尝试上传更多的2个文件,第三个(或后续)上传类似的等待,直到两个完成。这意味着我只能同时向目的地进行最多2次上传。

是否需要这种行为?

我使用FtpWebRequest&用于管理上传的FtpWebResponse类。 ftp以同步方式完成,但是在单独的线程上完成。管理它的类还具有除FTP之外的一些其他功能。因此,我不使用线程池来执行我的线程工作。我使用Thread类来完成我的线程工作。


我是一堆错误交织在一起的好意图

I've successfully created a class that allows me to do asynchronous file uploading. Because of this I am able to manage multiple uploads. I find that if I am trying to upload more that 2 files, the third (or consequent) uploads kind of wait until either to the two finish. Which means I can only do max 2 uploads to a destination simultaneously.

Is this behavior expected?

I use FtpWebRequest & FtpWebResponse classes to manage the uploading. The ftp is done in a synchronous fashion but on a separate thread. The class that manages this also has some other functionality apart from FTP-ing. Hence I don't use the thread pool to do my threading work. I use the Thread class to do my threading work.


I am a bundle of mistakes intertwined together with good intentions

推荐答案

可能是你的ftp服务器只提供了两个同时出现的错误一次连接意味着一次上传两次。

请检查您是否能够从Window Explorer上传两个以上的文件。
It could be that your ftp server only provides two simultanoues connection at a time which means two upload at a time.

So check whether you are able to upload more than two files from Window Explorer.


这篇关于多个同时上传到单个目的地的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆