Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting own IP address

 
Xavier Palau
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm programming a MIDLet that is basically a peer2peer application. So, I use different threads for the client part and the server part and use HttpConnection and socket connections. It is actually working on the real device, but I have found two problems:
1 - I don't know how can I get:
a) from the socket (server part): the IP address of
the client that has requested a connection
b) from the client: its own IP address
2- Even when I only attend a client at the same time and close the socket, when I have attended 3 or 4 connections seems that this 2 methods get blocked simultaneusly:
a) notifier.acceptAndOpen() at server part
b) InputStream.read() at client part
the worse thing is that the threads get blocked for ever (no timeout).
Please, can you help me with any of the two problems?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic