• 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 :-
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");

int pos=0;
while(true) {
int c=System.in.read();

{ 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 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 !!!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!