View Single Post
Old 11-22-2011, 04:57 AM   #5 (permalink)
New Member
Join Date: Nov 2011
Model: xxx
Carrier: XXX
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: How to Read from a socket ??

I have to create a server socket for accepting connections. For that how do i get the ip address of the phone (simulator) . I have used the following code to retrieve the ip.
scn = (ServerSocketConnection)"socket://:1234");
System.out.println("IP Address----" + scn.getLocalAddress().toString()+"\n");

But the value if ip its showing blank????? i.e. IP Address---- blank

Without the ip connec. can't be created......
Offline   Reply With Quote