BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-11-2008, 07:02 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2005
Model: 7250
Carrier: ATT
Posts: 20
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default SocketConnection in simulator _seems_ to work

Please Login to Remove!

I've created a SocketConnection to a server on the internet and the code in the debugger seems to work fine (no exceptions are thrown), but no data actually arrives at the server. I've got the MDS simulator running as well and I can do Http connections to the server so I know it is working. Any thoughts to why the code _appears_ to work?

...
c = (SocketConnection)Connector.open("socket://" + ddsStore.getServer() + ":8081");
os = c.openDataOutputStream();
is = c.openInputStream();

os.writeByte('@');
os.writeUTF(s);
os.flush();
...
Offline  
Old 07-11-2008, 07:16 AM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2005
Model: 7250
Carrier: ATT
Posts: 20
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ahhh...I just tried to telnet to port 8081 and I get connection refused...makes sense as I am VPN'd into the corporate network but I am firewalled. However, why the heck isn't something throwing connection refused?
Offline  
Old 07-11-2008, 09:33 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Oct 2005
Model: 7250
Carrier: ATT
Posts: 20
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Not so fast. I wrote a simple perl server script that listens on socket://localhost:8081....

Even when I send data at localhost I don't get an exception and I don't get any data either. Is this something with the simulator? I've has this code working on server J2ME phones without problem. Any ideas? Thanks.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

10Pcs Igbt Power Transistor Fgl60n100 1000V 60A 180W To264 Ic New G
$24.58
10Pcs Igbt Power Transistor Fgl60n100 1000V 60A 180W To264 Ic New G picture50Pcs Mcu 8Bit 1Kb Flash Sop8 Attiny13a-Su Ic New C
$17.73
50Pcs Mcu 8Bit 1Kb Flash Sop8 Attiny13a-Su Ic New C picture2Pcs Pic16f684 Pic16f684-I/Pdip-14 Mcu 8Bit 3.5Kb Flash New Ic H
$2.92
2Pcs Pic16f684 Pic16f684-I/Pdip-14 Mcu 8Bit 3.5Kb Flash New Ic H picture50Pcs Sop-8 Ao4606 Ao 4606 Mosfet Ic New Z
$6.79
50Pcs Sop-8 Ao4606 Ao 4606 Mosfet Ic New Z pictureArcher 276-2009 Silicon NPN Transistor CPN2222, Lot of 1, equiv. NTE123, 2N5183
$1.49
Archer 276-2009 Silicon NPN Transistor CPN2222, Lot of 1, equiv. NTE123, 2N5183  picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.