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.

Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

This thread has been viewed 950 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jun 17, 2018 17:44:55.