| | |
| | | //一行一行数据判断,找出需要的信息 |
| | | while ((tempLine = sr.ReadLine ()) != null) { |
| | | //找出Ip地址相关的信息 |
| | | //System.Console.WriteLine (tempLine); |
| | | //Utlis.WriteLine (tempLine); |
| | | if (tempLine.StartsWith ("LOCATION: http://")) { |
| | | tempLine = tempLine.Replace ("LOCATION: http://", "").Split ('/') [0]; |
| | | string [] ipAndPort = tempLine.Split (':'); |
| | |
| | | string deviceType = null; |
| | | |
| | | while ((line = sr.ReadLine ()) != null) { |
| | | //System.Console.WriteLine (line); |
| | | //Utlis.WriteLine (line); |
| | | if (line.StartsWith ("<friendlyName>")) { |
| | | deviceName = line.Replace ("<friendlyName>", "").Replace ("</friendlyName>", ""); |
| | | } else if (line.StartsWith ("<manufacturer>")) { |