Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in name resolution  RSS feed

guptabandhu roy
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys...
i am trying out the following client program :-
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("");

int pos=0;
while(true) {

{ case -1:System.out.println("client quits ");
case '\r':break;
case '\n' s.send(new DatagramPacket(buffer,pos,add,serverPort));
default: buffer[pos++]=(byte)c ;
public static void main(String[] args) throws Exception
{ ds=new DatagramSocket(clientPort);

here is a server running on my own computer whose name resolution is done dynamically using no-ips dynamic dns 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 !!!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!