Java UDP server not decoding correct IP address?

Use InetAddress.getHostAddress() to get the textual representation of the IP However, looking at your code, can you paste the error that you're getting. You should just be using the InetAddress object anyway, so something else might be happening.

Use InetAddress.getHostAddress() to get the textual representation of the IP. However, looking at your code, can you paste the error that you're getting. You should just be using the InetAddress object anyway, so something else might be happening.

InetAddress.getHostAddress() is the way to go indeed. The leading / is caused by an incorrect DNS configuration. 178.179.35.1 points to wimax-client.yota.Ru, but that host doesn't exist.

That causes the host not to be mentioned by the toString() function of InetAddress. – Friek Mar 3 at 23:06.

You don't need to do any of that. The DatagramPacket already has the source IP address and port in it. Just alter the data and send the same DatagramPacket.

Actually your code should probably work as-is - if it is failing the reason is not the /, that's only what's being displayed.

I have used the program. I was not able to get the IP address when my IP address was dynamic. Then I upgraded my system IP and took a static IP for this purpose.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions