如何在C#中使用套接字编程来传输大量文件? [英] How to transfer large amount of files using socket programming in c# ?
本文介绍了如何在C#中使用套接字编程来传输大量文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用套接字编程来传输大量文件.
我有一个仅传输5000 kb的程序.
I would like to transfer large amount files using socket programming .
I have a program which transfer only 5000 kb .
推荐答案
for (int i = 0; i < filesToTransfer.Count; i++)
{
TransferFile(filesToTransfer[i]);
}
上面的代码有很多假设:
0)您已将要传输的所有文件的名称收集到集合中
1)您已经编写了TransferFile()
方法
如果您还没有做完这两件事,那么上面的代码将无法工作.
The code above makes a lot of assumptions:
0) You''ve gathered the names of all of the files you wish to transfer into a collection
1) You''ve written the TransferFile()
method
If you haven''t done those two things, the code above will not work.
这篇关于如何在C#中使用套接字编程来传输大量文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文