Solved

Datagrams from Java

Posted on 1998-03-15
2
722 Views
Last Modified: 2012-06-21
Hello there, wonder if anyone can help me.
I am trying to send and receive datagrams using Java. I have copied two programs from a book, one to receive datagrams and one to send.

The receive datagram program has a parameter of a port to receive the data on.

The send program has three parameters, host , port and message.

I have a dial up account.

Now, the programs have all compiled correctly but if I try and use the send program using my node name I get the message "Network is unreachable", if I use it with a node that I know exists "post.demon.co.uk" the datagram is sent (I presume it is as the modem lights flash!!), so this must mean the the DNS is working...

If I try it with my IP address, I get the same message.

If I try it with 127.0.0.1 (loopback) the send light flashes once, but I do not receive the message.

Basically my question is, what ports should I be specifying with modem dial up and what is going on with the DNS ?

Can anybody help me ?
0
Comment
Question by:covellc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
unicorntech earned 100 total points
ID: 1587553
As you have a dial up account I would doubt that your node has been allocated a fully qualified domain name (FQDN). This would be why you could send tot a site that you know exists but not to your own. Also 127.0.0.1 is a loopback interface and hence the modem lights won't flash as the datagram will remain on the local PC.

let me know what you are trying to achieve and I will see if I can help.

Also I think what you are trying to do is not possible with your current setup.
0
 

Author Comment

by:covellc
ID: 1587554
What I am trying to do is  use Java to send datagrams to a friends PC. We then hope to build a "chat" type interface. I have  copied this program to send and receive data grams, so I just wanted to test it.

It is funny, cos I can't ping 127.0.0.1 either...

Is there a reason why I should not be able to ping my own IP address (not the 127...) ? I get a network unreachable when I try !!!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question