Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 24
Registered: ‎07-23-2008
My Device: Not Specified

Connection timeout - different with socket://?

Hi there,

 

I'm aware that the maximum connection timeout for HTTP connections is two minutes. Is this also the case when using raw socket requests? For example: 'socket://server:80/mywebservice;ConnectionTimeout=1200000'

 

Cheers

BlackBerry Development Advisor
Posts: 15,697
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Connection timeout - different with socket://?

The default timeout for a socket connection is also 2 minutes.  You can control the timeout by using the SocketConnectionEnhanced interface and setting the READ_TIMEOUT option.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 10
Registered: ‎11-18-2008
My Device: Not Specified

Re: Connection timeout - different with socket://?

Mark,

What should the effect of the ;ConnectionTimeOut incase of TCP socket connection through BES. We have noticed that ;ConnectionTimeout keeps the socket alive for the specified time. If we do not use that parameter in the connection string (incase  of BES) sockets timeout after two minutes.

 

The timeout period start when socket last received data from other side -- so sending continuous data from device does not help (like  Ping). 

 

best

Pankaj Jain

 

best,
Pankaj Jain
www.earlysail.com
http://download.earlysail.com/i_love_blackberry/
BlackBerry Development Advisor
Posts: 15,697
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Connection timeout - different with socket://?

There is no way for a third party application to increase the timeout beyond the (default 2 minute) value when connecting through a BlackBerry Enterprise Server.  This timeout can be increased or decreased on the BlackBerry Enterprise Server itself.  So on the server side you could set a value greater than 2 minutes.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
New Developer
Posts: 16
Registered: ‎12-18-2008
My Device: Not Specified

Re: Connection timeout - different with socket://?

Hi Mark,

 

We are using BES 4.1.6. Most of the time when our users try to download video files as large as 600 to 700KB, it gives Connection timed out after ~ 120000 or sometimes 130000. The issue is, this error is not thrown all the time, sometime we can download the videos successfully.

 

Is there a way by which we can increase the timeout? If yes, please share the procedure for the same.

 

Thanks,

Akash

Highlighted
Contributor
Posts: 35
Registered: ‎09-15-2011
My Device: Torch 9800, Tour 9630
My Carrier: VZW

Re: Connection timeout - different with socket://?

SocketConnectionEnhanced.READ_TIMEOUT is a final field and cannot be assigned. Any other ideas?