如何通过套接字发送大文件 [英] how to send a big file by sockets

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

问题描述

如何通过套接字发送大文件

how to send a big file by sockets

推荐答案

考虑到问题中完全没有任何信息,this [< a href =https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=c%23%20sockets%20send%20filetarget = _blanktitle =New Window> ^ ]是关于你将得到的最佳答案。
Considering to total lack of any information in your "question" at all, this[^] is about the best answer you're going to get.


使用FTP而不是突破门。



但是,使用带有TCP协议的纯套接字也不是问题。您必须设计一个简单的应用层协议而不是FTP,它实际上可以比FTP简单。由于TCP是面向会话的,您可以轻松地将大文件分成更小的块并逐个传输。我不想给你更多详细信息,因为你从未提及 你曾经尝试过什么 到目前为止没有解释你的问题。如果您提出更具体的问题,您可能有机会获得更多帮助。



-SA
Use FTP instead of breaking through the open door.

However, using pure sockets with TCP protocol is not a problem, too. You have to design a simple application-layer protocol instead of FTP, which can actually be simpler than FTP. As TCP is session-oriented, you can easily break the big file into smaller chunks and transmit them one by one. I don't want to give you more detail, just because you never mentioned what have you tried so far and did not explain what you problem is. If you ask more specific question, you may get a chance to get some more help.

—SA

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

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