Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor bharats's Avatar
    Join Date
    Nov 2006
    Posts
    260
    Hi all,

    I am facing an issue which is... when ever I am sending request to server sometimes it takes too much time to get the complete response from server. So in this case I want to show "connection time out" dialog to user.

    Is there any property to set for RHTTPTransaction or RHttpSession so that after that specific time interval i will get a callback inside MHFRunL with request/connection timeout code. OR is there any other way to handle this case?


    Any help in this regard is highly appreciated.

    regards,
    Bharat

  2. #2
    Registered User kamalakshan's Avatar
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998
    hi,

    you can handle based on the status codes. If your request was successful you will receive 200 Ok or else depending upon the status code handle the error.

  3. #3
    Regular Contributor bharats's Avatar
    Join Date
    Nov 2006
    Posts
    260
    Hi,

    Yes that is default behavior. But i want to control(set) the timeout property so that i will receive that code(408) if my client will not get the response within that time frame and i will show a dialog to user for that time out.
    I want what is the way to set this time out property.

    regards,
    Bharat

  4. #4
    Registered User kamalakshan's Avatar
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998
    Hi,

    Any client goes through the following cycle:

    * Obtain an IP address
    * Open an IP socket connection to that IP address.
    * Write an HTTP data stream through that socket.
    * Receive an HTTP data stream back from your Web server in response.

    Now this data stream contains status codes whose values are determined by the HTTP protocol. After parsing this you are getting status code 408.

    So the response is coming from the server. And hence AFAIK the timeout is also set from the server side.

    The reason you are getting this error might be more due to the workload on your Web server being very high.


    This error occurs in the final step above when the client receives an HTTP status code that it recognises as '408'.

  5. #5
    Regular Contributor WinHw's Avatar
    Join Date
    Jun 2003
    Location
    Jakarta, Indonesia
    Posts
    164
    Hi, you can try to using a timer and set the timer expired in how many second, then when the timer is expired (e.g. after 300 seconds) then cancel the HTTP transaction.

    Something like this :
    ...
    IssueHTTPPost();
    iTimer->Start(300);
    ...

    void eTimerExpired()
    {
    CancelHTTP();
    }

Similar Threads

  1. Symbian OS error -4 at HTTP Post
    By rosenholzer in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2010-07-24, 15:45
  2. What is the best Unit test framework for Symbian?
    By nawkboy in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2010-02-01, 18:39
  3. HttpConnection timeout property -- Is it possiblee to set it (or at least read it)?
    By _ericlo_ in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2008-06-11, 11:18
  4. What is the best Unit test framework for Symbian?
    By nawkboy in forum Symbian C++
    Replies: 0
    Last Post: 2003-02-10, 20:07
  5. How can I set up a WTLS session with Symbian 6.0 SDK?
    By jdouwes in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2002-09-04, 11:01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved