简体   繁体   中英

Connect to a server without knowing ip c#

I have a client-server thing where I am the server and the clients need to connect to me. But the ips on the network change all the time so its not really reliable to hardcode it in the program. How would i go about doing this? Thanks for any answers

您可以使用UDP使用TCP ip详细信息响应客户端的第一个请求以连接服务器,每个客户端请求必须首先与UDP连接,然后其建立TCP连接。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM