ååï¼id:seiunsky:20061125:1164490668ï¼
ãããã¯ã¼ã¯ã確ç«ãã¦ãããã®ç¢ºèªæ¹æ³
NetworkStream.DataAvailableã ãã§ãããã¯ã¼ã¯ä¸ã«åå¾ã§ãããã¼ã¿ãã¾ã ãããã確èªããã®ã§ã¯ãã¾ããããªãã¨ãããã¨ãååæ¸ããã
ã§ãçµå±ãããããã¨ã§è§£æ±ºããã
do { size = nwStream.Read(buff, 0, uff.Length); sb.Append(Encoding.GetEncoding("EUC-JP").GetString(buff, 0, size)); } while (size != 0 || nwStream.DataAvailable);
ã¡ãã£ã¨ãããã«ãããããããªããã©ãã¾ãNetWorkStreamã®Readã¡ã½ããã§ãã¼ã¿ãåå¾ããããã®éãReadã¡ã½ããã¯èªã¿åã£ããã¼ã¿ã®ãµã¤ãºãæ»ãå¤ã¨ãã¦è¿ãã
ãªã®ã§ããã®è¿ã£ã¦ããå¤ã0ã§ç¡ãæï¼ï¼ãã®æã¯ã¾ã åå¾ãããã¼ã¿ããã£ãï¼ã«ã¯ã«ã¼ããç¶è¡ãããã¨ããæ¹æ³ã«å¤ãã¦ã¿ãã
ãã®ããæ¹ãæããã¦å®å ¨ãªæ¹æ³ãªã®ãããããããªãã
å°ãªãã¨ãä¸ã®ä¸ã®ãµã³ãã«ã½ã¼ã¹ã§ã¯å½¹ã«ç«ããªãã®ã§ãªãã¨ãéãæ¹æ³ãèãããããªãã£ãã®ã§ãã£ãã
ä¾ï¼ä¸ã®ä¸ã«ãããµã³ãã«ã½ã¼ã¹ï¼ä»¥ä¸ã®URLã®ä½¿ç¨ä¾ãåç
§ï¼
http://msdn2.microsoft.com/ja-jp/library/system.net.sockets.networkstream.read(VS.80).aspx
ä»ã«ãã£ã¨ã¹ãã¼ããªããæ¹ãç¥ã£ã¦ãã人ãå±
ããæãã¦ãã ããï¼ããããNetworkStreamã使ããªãæ¹æ³ã§ãå¯ï¼ã