| Author |
problem in name resolution
|
guptabandhu roy
Greenhorn
Joined: Mar 22, 2008
Posts: 9
|
|
hi guys... i am trying out the following client program :- import java.net.*; class ChatCseClient { public static int clientPort=999; public static int serverPort=998; public static int buffer_size=1024; public static byte buffer[]=new byte[buffer_size]; public static DatagramSocket ds; public static void TheClient() throws Exception { InetAddress add=InetAddress.getByName("csehackers.no-ip.biz"); System.out.println(add); int pos=0; while(true) { int c=System.in.read(); switch(c) { case -1:System.out.println("client quits "); return; case '\r':break; case '\n' s.send(new DatagramPacket(buffer,pos,add,serverPort)); pos=0; break; default: buffer[pos++]=(byte)c ; } } } public static void main(String[] args) throws Exception { ds=new DatagramSocket(clientPort); TheClient(); } } here csehackers.no-ip.biz is a server running on my own computer whose name resolution is done dynamically using no-ips dynamic dns services..now the problem is when i am printing out the inetaddress it is showing me a wrong address that is the name resolution is not happening properly..however when i am typing the same address in my browser the name resolution is happening properly ...help !!!
|
 |
 |
|
|
subject: problem in name resolution
|
|
|