×

Discussion Board

Results 1 to 1 of 1
  1. #1
    Regular Contributor
    Join Date
    Apr 2005
    Posts
    89

    HTTP Keep-Alive (again) - should it work this way?

    I'm doing something like this -
    Code:
    /* iUri is of type TUriParser8, zero-initialized initially */
    
    iHttpTransaction = iHttpSession.OpenTransactionL(iUri, *this);
    
    /* loop start */
    
        /* Fill iUri with real values here */
    
        iHttpTransaction.Request().SetURIL(iUri);
        iHttpTransaction.SubmitL();
    
        /* Read all data until THTTPEvent::ESucceeded or THTTPEvent::EFailed is received */
    
        iHttpTransaction.Cancel(); /* does not work without this */
    
    /* loop! */
    So I'm reusing RHTTPTransaction instance. Does it mean HTTP connection will be kept alive (on phones with real TCP/IP stack)? Should I add Keep-Alive headers myself to each request? How to check from the client side weather connection is actually being kept alive, if I know that server is keep-alive capable.

    Thank you.

    P.S. Still found no way to check, even at server side, weather connection is being kept alive or not, but at least according to http://www.faqs.org/rfcs/rfc2616.html adding any headers is *not necessary* if you are using HTTP 1.1 - connections are being kept alive by default there.
    Last edited by Marat Khalili; 2005-05-23 at 05:20.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •