From: Dean M. C. B. <dmb...@fr...> - 2008-04-21 06:05:09
|
Hi Divye, These are great observations, thanks for taking the time. Let me try and address your questions inline below. > -----Original Message----- > From: cpp...@li... > [mailto:cpp...@li...] On > Behalf Of Divye Kapoor > Sent: Sunday, April 20, 2008 1:53 AM > To: C++ Networking Library Developers Mailing List > Subject: Re: [cpp-netlib-devel] Implemented Rudimentary Unit > Test inbranchhttp_integration > > Hi, > I was just going through the test code and I found 2 > difficulties:- 1. The http 1.0 implementation tests don't > seem to fail if they are run with no network connection (or > didn't I wait long enough for them to time out?) I actually haven't tried this myself -- and admittedly, had not been thinking about this when my focus was getting tests in to make sure that the implementation compiles first. However, you should be getting a timeout error but depending on your OS, the amount of time it takes may not simply be 30 seconds -- although I think in Linux this is the OS default. > 2. There > doesn't seem to be any timeout or connection status feedback > available with the client object. For example, how does a > client come to know that a connection seems stalled and needs > a restart (for example, an intelligent download agent?). You're right -- this information should be put into the 'get' or 'post' methods, most probably refactored into its own (private) function inside the client. This can be a simple Asio Timeout handler using an approach given by Chris Kohlhoff in one of our conversations on the Boost C++ developers list. I can implement the changes later. > Where does this kind of info fit in the basic_message > hierarchy? (I didn't find any appropriate functions or tests > for this kind of situation) > It actually doesn't it in the basic_message hierarchy because timeouts are not part of the message abstraction. This rather is a protocol client specific thing and should be handled at that layer. > Have I looked at the right places for these things or have I > missed them completely? > You've looked at the tests so I'd say you've been looking at the right place(s). :) Thanks Divye! -- Dean Michael Berris Software Engineer, Friendster, Inc. <dmb...@fr...> +639287291459 |