DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Java (http://www.daniweb.com/forums/forum9.html)
-   -   To get ip in j2me (http://www.daniweb.com/forums/thread162677.html)

Venks Dec 17th, 2008 3:28 am
To get ip in j2me
 
Hai Friends,

Iam using gprs connection for my project, i want to send message from pc server to my mobile client by UDP connection,
how can i do? how can i get ip for mobile gprs connection? please help me for this problem

AlbertPi Dec 17th, 2008 5:12 pm
Re: To get ip in j2me
 
You mean after successfully establishing a gprs connection, right ?
Are you using Nokia *** or ?

Try the following codes:
1.
ServerSocketConnection scn = (ServerSocketConnection)Connector.open("socket://:1234");
System.out.println(scn.getLocalAddress());


All times are GMT -4. The time now is 12:32 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC