Solved

Datagrams from Java

Posted on 1998-03-15
2
718 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
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now