本文介绍了在网络中找到TcpServer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨专家,



是什么让tcp客户端连接到未知的tcp服务器的最佳方法。这意味着我的网络和多个服务器应用程序中有多个客户端,现在我希望所有客户端自动连接到其中一个服务器。首先我尝试使用UDP并广播服务器地址和端口,只要我在每台机器上运行只有一个客户端,这就可以正常工作。当我在同一台机器上有2个客户端时,运行UDP方式将不再起作用,因为每个udpsocket只能被一个应用程序监听的限制。



如何在没有udp的情况下实现这样的服务器信息广播的任何想法?



亲切的问候

Manu

Hi experts,

whats the best way to let a tcp client connect to an unknown tcp Server. That means i have multiple Clients in my Network and multiple Servers application, now i want that all Clients connect automatically to one of the servers. First i tried using UDP and broadcast the server address and port, this works fine as long as I have only one Client on each machine running. When i have 2 Clients for example on the same machine running the UDP way would not work anymore because of the restriction that each udpsocket can only be listened by one application.

Any ideas how i can implement such an server info broadcast without udp?

Kind Regards
Manu

推荐答案


这篇关于在网络中找到TcpServer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-28 04:28
查看更多