10-13-2010 04:31 AM
I wnat to know that how many Device in the smae Lan is alive , and I knwos BB JAVA doesn't support broadcast , so I must useing Tcp to query xxx.xxx.xxx.1~255 device.
if the deivce doesn't alive , Connector.open(url) method spand 2000ms ,and then
I have to query 254 Devices. It cost very big time to search.
Connect.open() doesn`t have set Timeout method, can anyone hlep me?
10-15-2010 04:15 PM
Connectiontimeout only works for bes and bis connections.
you'll have to pass connecting into another thread which can be killed in case it takes longer than a specified time
10-19-2010 09:59 AM
you can set a timeout using http://www.blackberry.com/developers/docs/5.0.0api
10-19-2010 01:32 PM
Unfortunately, SocketConnectionEnhanced only lets you set the read timeout (and it can only be set once Connector.open() completes), whereas in this case we are interested in a connect timeout so that Connector.open does not block for long.