URL から文字列をダウンロードしようとしています。残念ながら、それは非常に遅いです。
これが私のコードです:
// One of these types for two bad solutions anyway
// byte[] result = new byte[12];
// string result;
using (var webClient = new System.Net.WebClient())
{
String url = "http://bg2.cba.pl/realmIP.txt";
//result = webClient.DownloadString(url); // slow as hell
//webClient.OpenRead(url).Read(result, 0, 12); // even slower
}
約4〜5秒かかりますが、これは私には非常に不適切に思えます...
この URL のコンテンツは IP です
XX.YYY.ZZ.FF