Solved

Datagrams from Java

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

707 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