示例#1
0
        public static string getServerIpAndPortURL(ImageStreamingServer server)
        {
            string hostName = Dns.GetHostName();                                         // Retrive the Name of HOST

            int lastIpAddressIndex = Dns.GetHostByName(hostName).AddressList.Length - 1; //always get the last ip for streaming

            //System.Diagnostics.Debug.WriteLine("Checking last ip index : " + lastIpAddressIndex);

            string myIP = Dns.GetHostByName(hostName).AddressList[lastIpAddressIndex].ToString();

            string myPORT = server.Port.ToString();

            string ipAndPortURL = "http://" + myIP + ":" + myPORT;  //made like an url

            //since the client player only accepts this format

            return(ipAndPortURL);
        }
示例#2
0
 public static string getServerURL(ImageStreamingServer server)
 {
     return(getServerIpAndPortURL(server));
 }