Problem while open socketConnection
Hi all,
I own a HTC P3600 pal, windows mobile, with Intent Midlet Manager Installed...I try to open a ServerSocketConnection to get message from server, but it fails.
I use MIDP 2.0 and CLDC 1.0
this is the code
ServerSocketConnection scn = (ServerSocketConnection) Connector.open("socket://:5000")
SocketConnection sc = (SocketConnection)scn.acceptAndOpen();
I get always "javax.microedition.io.ConnectionNotFoundExcpetion"...any idea?!?!?!
Thanx
[498 byte] By [
lonebeara] at [2007-11-27 7:39:26]

# 4
No, it doesn't work; the exception is the same above...Also, I can't see the printStackTrace, because I run it directly into my device...is there any method to see the stack?Thanks
# 5
> No, it doesn't work; the exception is the same
> above...
> Also, I can't see the printStackTrace, because I run
> it directly into my device...is there any method to
> see the stack?
>
> Thanks
there is no server running on your device. you should bind your connection to a real server...
use an alert to display the error on your device
# 6
..but I thought that is my DEVICE the server!!!!....
This is my situation:
- The device is linked to my notebook via USB
- I can ping it with the IP address 169.254.2.1
- Also, when I detach it from USB and get the Wireless LAN link, I got the same error...
I just want it to listen on that door for incoming connections...declaring ServerSocketConnection doesn't effectively open a PORT on my device?
If not, could you please explain to me the architecture?(I'm a newbie on J2ME)?
Thanks a lot