aspose file tools
The moose likes Sockets and Internet Protocols and the fly likes problem in name resolution Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "problem in name resolution" Watch "problem in name resolution" New topic
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 !!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in name resolution
 
Similar Threads
Problem in UDP client/server application
socket udp programming
Audio in Java
Problem in UDP client/server application....
how to send sound buffer in UDP