我可以使用服务器套接字和多个客户端C#传输文件吗 [英] Can I transfer file using server sockets and multiple clients C#

查看:76
本文介绍了我可以使用服务器套接字和多个客户端C#传输文件吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个项目。我想将文件从服务器发送到多个连接的客户端。

我想要的是,我选择文件而不是从服务器发送文件,所有连接的客户端都收到该文件file.I我不是编程专家。任何帮助都会很有帮助。



我尝试过的事情:



单个服务器和客户端文件共享。

I am creating a project.I want to send file from server to multiple connected clients.
All i want is, I select the file and than send it from server, all connected clients receives that file.I am not pro at programming. Any assistance will be great help.

What I have tried:

Single server and client file sharing.

推荐答案

这将是一个非常困难的项目,因为你不是编程专家。



在你必须保证发送数据的准确性的情况下套接字不容易处理,例如文件。



同时接收文件的多个客户端相当复杂和复杂,因为一个或多个客户端可能没有收到文件包并希望重新发送坏包,或者您可能想要重新发送整个文件。



更好的解决方案是向客户发送通知,告诉他们所有人都可以从托管文件的任何服务器中获取文件。然后,每个客户端都可以自己处理服务器和重新传输。
This is going to be a very difficult project is you're not "a pro at programming".

Sockets are not easy to deal with in a situation where you have to guarantee accuracy in the data being sent, like files.

Multiple clients receiving a file at the same time is rather complex and complicated by the situation where one or more clients might not receive a packet of the file and wants a re-send of the bad packet, or you may want to resend the entire file.

A better solution would be to send a notification to the clients to tell them all to pick up the file from whatever server may be hosting the file. Each client can then deal with the server and retransmissions themselves.


这篇关于我可以使用服务器套接字和多个客户端C#传输文件吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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