From: Glyn M. <gly...@gm...> - 2010-07-22 13:54:28
|
Hello Alex, 2010/7/21 Александр Мартынов <am...@ma...> > Hello! > > Sorry, I am not a developer, I am simply interesting on cpp-netlib > library, but I was not found any support mailing list. > > My questions are: > 1) HTTP client and SSL. How I can compile client without HTTPS support > (which adds dependency on openssl library). I try to define > BOOST_NETWORK_NO_HTTPS, but it not work. I try to lookup in code for > BOOST_NETWORK_NO_HTTPS or BOOST_NETWORK_HTTPS, but there is no occurences > found. > Some https features found in > boost\network\protocol\http\impl\sync_connection_base.hpp, but they are > unconditional and can't be stripped. > What version of cpp-netlib are you using? There was a discussion about this a month and a half ago and the decision was to define a macro BOOST_NETWORK_ENABLE_HTTPS in order to explicitly opt-in to using SSL. However, this has not yet been implemented. It is not possible to compile the HTTP client without SSL in the current release (0.6). http://www.mail-archive.com/cpp...@li.../msg00443.html > > 2) cpp-netlib is hard C++ library, and I can't understand it. > The internal details can be quite obscure, but it is a stated goal that using the library should not be hard to do. Admittedly, the documentation is still incomplete but I am making an effort to make it more accessible. If you have anything specific you want addressed, please let me know and I will try to deal with it. > I think that HTTP server (in sample) is serial (not a parallel) and handles > requests consistently. Hard worker requests can easy get denial of service > when incoming connection overfull connection accept queue. I am right? Is > the way to make parallel server, which handles requess in different threads? > I think you're right. The HTTP server provided is very simple, but eventually cpp-netlib ought to provide the building blocks for more complex servers. I know Dean has more ideas on this, he could let you know more about his plans. > > 3) Is there way to stop client from other thread? > Such illustrated above: > -- worker thread -- > client.get(); // client.post() etc > ------------------- > > -- GUI thread -- > if (canceled && client.in_progress()) client.abort(); > ---------------- > > Or, may be there is the way to install callback which periodicaly receives > client status events (such as "resolving", "connecting", "awaiting_reply") > and can return value to signal that abort needed (true for continue, false > to abort, as sample) > > Or, may be client can be used in async mode such here: > client.get(); > while( not canceled and client.in_progress() and not client.done()) {} As Dean already mentioned, he is working on an asynchronous HTTP client so I will leave it to him to respond more fully to this. > 4) Is there the way to make secure (https) server? > > Yes, but as with (2) it's simply a matter of implementing it. Regards, Glyn |