可靠的多客户端单服务器LAN通信 [英] reliable Multi-client single server LAN Communication

查看:93
本文介绍了可靠的多客户端单服务器LAN通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我花了很长时间尝试使用套接字和多线程才发现我没有丝毫的线索如何使用它们。

现在时间非常短,我需要找到另一种解决方案。



目标:多台客户端机器必须连接到可以接收的服务器机器来自所有客户端的几个(字符串)命令没有像我一样吓坏了。我们在这里谈论非常快速的命令。任何时候每个客户端都可以尝试发送1-200个命令。



服务器需要响应收到的每个命令的1个或所有客户端。

因此客户端也会被消息轰炸,我需要能够处理每个命令。



当服务器或客户端收到命令,我调用一个子程序,在窗体级线程上引发一个事件来通知应用程序。



我现在所拥有的似乎能够运行1命令在某个时间,但更多的是惊慌失措。



我真的没有时间专注于这个服务器和客户端应用程序,我希望有人可以指向我一些可以使用且非常可靠的东西。直到有一天我可以在这个主题上学到更多。



提前谢谢。

Hi all,
I've spent a very long time trying to work with sockets and multi threading only to find that i don't have the slightest clue how to use them.
Being very short on time now, I need to find an alternative solution.

objective: Several client machines must connect to a server machine that can receive several (string)commands from all clients without freaking out like mine does. We are talking very rapid commands here. ant any moment each client could try to send 1-200 commands.

The server will need to respond to 1 or all clients for every command it receives.
So the clients will be getting bombarded with messages as well and I need to be able to process every command.

When the server or client receives a command, I call a sub procedure that raises an event on the form level thread to notify the application.

What I have right now seems to be able to run 1 command at a time but freaks out with anything more.

I really don't have time to focus on this server and client application and am hoping that someone can point me towards something that is ready for use and very reliable. Until the day that I can learn more on this topic.

Thanks in advance.

推荐答案

请看看我过去的答案:

插座编程中的业余问题 [ ^ ],

来自同一端口的多个客户端号码 [ ^ ]。



-SA
Please see my past answers:
an amateur question in socket programming[^],
Multple clients from same port Number[^].

—SA


这篇关于可靠的多客户端单服务器LAN通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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