TCP端点的动态发现 [英] Dynamic Discovery of TCP Endpoints
本文介绍了TCP端点的动态发现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我使用TcpListener公开和TCP端点,我如何动态发现网络上特定类型的所有开放侦听器?希望它能让我的用户轻松连接(类似于发现SQL服务器实例)。
If I expose and TCP endpoint using TcpListener, how can I dynamically discover all the open listeners of a specific type on my network? Want it make it easy to connect for my users (similar to discovering SQL server instances).
谢谢,¥b $ b David
Thanks,
David
推荐答案
嗨David。
Hi David.
我不认为使用tcp是可行的需要知道你连接的端点。
I don't think it's possible using tcp as you need to know the endpoint you're connectiong to.
我会使用UDP,这样你就可以用你的tcp端点信息广播一条消息,然后客户端可以用它打开一个tcp连接。
I would use UDP so you can broadcast a message with your tcp endpoint informations and clients could then open a tcp connection using that.
请参阅"使用UDP服务"
Alexandre
Alexandre
这篇关于TCP端点的动态发现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文