每个人!
我在一个本地网络中有很多设备。如何获取所有这些设备的 IP 地址?
我想做这样的事情:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Tools : MonoBehaviour {
//get local ip address
public string getIP() {
string IP = "";
IP = Network.player.ipAddress;
return IP;
}
//get all ip addresses in local network
public List<string> getIPArray() {
List<string> listIP = new List<string>();
return listIP;
}
}