±Û¾´ÀÌ :WithJoy 2000³â 6¿ù 10ÀÏ 14:46:54
In Reply to: [Áú¹®]java.net.NoRouteToHostException posted by ¹æ¼±ÀÏ on 2000³â 6¿ù 07ÀÏ 23:09:12:
´ÙÀ½Àº jdk ducumentÀÇ ³»¿ëÀ» ¹ßÃéÇÑ °ÍÀÔ´Ï´Ù.
Simple Usage Examples:
On the Client Side:
import java.net.*;
...
Socket s = null;
try {
s = new Socket("foo.org", 80);
} catch (UnknownHostException e) {
// check spelling of hostname
} catch (ConnectException e) {
// connection refused - is server down? Try another port.
} catch (NoRouteToHostException e) {
// The connect attempt timed out. Try connecting through a proxy
} catch (IOException e) {
// another error occurred
}
À§¿¡ ÇÁ¶ô½Ã¸¦ ÅëÇÑ ¿¬°áÀ» ±ÇÇÏ°í ÀÖ±º¿ä.
±× ¹æ¹ý¿¡ ´ëÇؼ± ¸ð¸£°í, ¼ÒÄÏÀ¸·Î´Â ¾ÈµÈ´Ù´Â ¸»À» µé¾ú´Âµ¥ È®ÀÎÀ» Çغ»°ÍÀº ¾Æ´Õ´Ï´Ù.