通过套接字从服务器向客户端发送文件 [英] sending file through socket from server to client

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

问题描述

大家好,我想创建一个应用程序,其中服务器通过套接字向客户端发送文件.我试图在网上找到相关的代码,但并不是那么幸运.你们能为我提供从服务器向客户端发送文件的代码吗?


预先谢谢您.

Hello guys, I want to create an application in which a server sends a file to a client through socket. I tried to find relevant code over the net but was not so fortunate. Can u guys provide me with the code for sending file from server to client.


Thank you in advance

推荐答案

从服务器到客户端都没关系.过程完全相同.任何通过套接字发送文件的客户端/服务器代码都可以使用.

顺便说一句:我们不只是交出完整的项目去做任何事情.如果您在工作中编写代码,那就是您的报酬,而不是复制粘贴其他人的工作.
It doesn''t matter if it''s going from the server to the client. The process is exactly the same. Any client/server code to send a file over sockets will work.

BTW: We''re not in the business of just handing over complete projects to do anything. If you''re writing code in your job, that''s what you get paid to do, not copy-n-paste someone elses work.


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

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