如何使用套接字编程通过网络发送多个文件? [英] How Can I Send Multiple Files Over The Network Using Socket Programming?

查看:119
本文介绍了如何使用套接字编程通过网络发送多个文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用套接字编程通过网络发送多个文件?我可以同步从客户端向服务器发送单个文件。我是否需要异步发送多个文件?

谢谢

how can i send multiple files over the network using socket programming?. I can send a single file from client to server synchronously. Do i need to send it asynchronously for multiple files?
Thanks

推荐答案

模糊的问题。



您正在做的是使用套接字发送数据。这可能是你如何编码一个文件或多个文件到这些数据的情况。



如果你可以发送一个文件,如何你在做什么?



这取决于你的异步意思。如果你的意思是使用Begin / EndInvoke类型的东西,这取决于你,但没有必要。如果你的意思是在线路上进行多路复用,那么只有痛苦和痛苦就在这条路上。
Vague question.

What you are doing is sending data using sockets. It may be a case of how you encode a file, or multiple files into that data.

If you can send one file, how are you doing it?

And it depends what you mean by asynchronously. If you mean using Begin/EndInvoke type stuff well that's up to you but it's not necessary. If you mean multiplexing on the wire, well only pain and misery lies down that road.


我的做法类似于http://socketprogramming.blogspot.de/2007/11/file-transfer -using-c-socket.html。当我尝试发送多个文件时,无法正确发送所有文件。
I did similar to http://socketprogramming.blogspot.de/2007/11/file-transfer-using-c-socket.html.When i tried to send multiple files, all the files could not be sent properly.


这篇关于如何使用套接字编程通过网络发送多个文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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