10-08-2008 07:30 AM
Not really my area, but here is a quick answer. Hopefully someone else will provide a fuller answer later.
Unless you are connecting wirelessly, which I don't think is supported in OS 4.2, you do not have a network IP Address or Host Name. All your IP Traffic is tunneled to you via what is effectively a NAT box or proxy service - either provided by carrier for direct TCP, or via the MDS for BES/MDS connection.
10-08-2008 08:46 AM
You can always have a server report it back to you but more directly
SocketConnection.getLocalAddress() is supposed to work but I've never tried it.
It further claims,
"The local hostname (if available) can be accessed from System.getProperty("microedition.hostname")
If you initiate a connection, the peer can reply to whatever IP is advertised but
it would be nice to find a general means, even if carrier specific, of fixed originated
connection addressing. If you do find locally available interesting hostnames, please post some here and I'll try
to hit you from my desktop.
If you just want to talk to yourself, usually 127.0.0.1 will work.
I don't see anything in RIM class list that is obviously similar to InetAddress
10-08-2008 09:51 AM