可靠的多客户端单服务器LAN通信

编程入门 行业动态 更新时间:2024-10-10 12:18:03
本文介绍了可靠的多客户端单服务器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通信

本文发布于:2023-11-30 22:31:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1651667.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:客户端   可靠   通信   服务器   LAN

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!