Forums Register Login
getting InetAddress over UDP protocol
Hi all,

I am trying to connect to a server over UDP.
how can I get the "raw IP Address" as they call it in the documentation starting from the normal ip "" ??

this raw IP address as a byte[] is the agrument passed to the constructor of an InetAddress class.

Thanks a lot for your help.
Use InetAddress.getByName():

Determines the IP address of a host, given the host's name.

The host name can either be a machine name, such as "java.sun.com", or a textual representation of its IP address. If a literal IP address is supplied, only the validity of the address format is checked.


This thread has been viewed 1008 times.

All times above are in ranch (not your local) time.
The current ranch time is
Sep 26, 2018 08:16:09.