在不知道IP地址的情况下连接到Socket Server [英] Connecting to Socket Server without knowing IP address

查看:319
本文介绍了在不知道IP地址的情况下连接到Socket Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在不知道IP地址的情况下连接到套接字服务器,例如自动检测活动服务器之类的东西.

如果有可能,请告诉我该怎么做.

Is it possible to connect to socket server without knowing the IP address, like auto detecting the active server or something.

If it''s possible please tell me how to do it.

推荐答案

是的,如果您位于同一LAN中,并且已经设置了UDP服务器,则可以.

看到这里: http ://www.eggheadcafe.com/tutorials/csharp/9da74d3d-7415-4dfe-984e-2a5db900bdb2/clientserver-autodiscovery-in-c-and-udp-sockets.aspx [
Yes you can if you are within the same LAN, and you have setup a UDP server.

See here : http://www.eggheadcafe.com/tutorials/csharp/9da74d3d-7415-4dfe-984e-2a5db900bdb2/clientserver-autodiscovery-in-c-and-udp-sockets.aspx[^]


这篇关于在不知道IP地址的情况下连接到Socket Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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