BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 02-13-2007, 04:24 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Model: 8800
Carrier: Orange
Posts: 181
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Set Socket Timeouts

Please Login to Remove!

Hi,

Is there any way of setting the timeout value on a socket connection? I have created my connection like so:

Code:
connection = (SocketConnection) Connector.open( url, Connector.READ_WRITE, true );
Where true should enable timeout exceptions, but I never see them. If I try to make a connection to a machine that doesn't give a response I have to wait about 2 or 3 minutes, and then I get a null pointer exception.

Can I explicity set the timeout? If not I guess I am going to have to manually have a timer that cancels the connection after the given time.

TIA, Ben
Offline  
Old 02-22-2007, 03:08 PM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Feb 2007
Model: 9000
Carrier: SFR
Posts: 48
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't remember having seen this possibility.
Hum what about separate thread with a sleep !?
Offline  
Old 02-23-2007, 06:30 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Model: 8800
Carrier: Orange
Posts: 181
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yeah that's what I've ended up doing.
Offline  
Old 02-23-2007, 10:40 AM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Feb 2007
Model: 9000
Carrier: SFR
Posts: 48
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yep
:(
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

LOT OF 25 MOTOROLA SEMI CONDUCTOR MC3403P
$50.0
LOT OF 25 MOTOROLA SEMI CONDUCTOR MC3403P pictureALPHA RAINBOW RIBBON CABLE 100 FEET, 20 PIN CONDUCTORS 30.5M INTERNAL WIRING
$60.0
ALPHA RAINBOW RIBBON CABLE 100 FEET, 20 PIN CONDUCTORS 30.5M INTERNAL WIRING pictureALPHA RAINBOW CABLE, 80 FEET, 16 PIN CONDUCTORS,NO.HM719680, SIZE: 30.5 M
$60.0
ALPHA RAINBOW CABLE, 80 FEET, 16 PIN CONDUCTORS,NO.HM719680, SIZE: 30.5 M picture20' Belden 83604 4-Conductor. 20 awg, shielded
$9.99
20' Belden 83604 4-Conductor. 20 awg, shielded pictureSouthwire 64162122 2 Conductor 18/2 Thermostat Wire, 18-Gauge Solid Copper Class
$11.77
Southwire 64162122 2 Conductor 18/2 Thermostat Wire, 18-Gauge Solid Copper Class picture






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