[wx-dev] wxHTTP rewrite?
Vadim Zeitlin
vadim at wxwidgets.org
Fri May 2 05:19:59 PDT 2008
On Fri, 02 May 2008 13:24:36 +0200 Falk Tristram <ftristram at gmx.de> wrote:
FT> as I am relatively new to this list, don't blame me if I missed some
FT> resources/articles about this topic, but the wx-wiki seems very empty
FT> about "HTTP" and "3.0.x-rewrite".
Personally I still think that the best way to rewrite wxHTTP would be to
just provide wrappers around libcurl under Unix and WinInet functions under
Win32.
FT> So I am trying this way.
FT>
FT> To short things up, wxHTTP is not beautiful :
We agree here.
FT> PS: I going to wirte this code anyway, but it would be shame not to
FT> contribute it.
Yes, definitely. wxHTTP (and also wxFTP) is in sore need of update. But I
wonder what do you think about the idea above, i.e. wrap the existing code
in wx-friendly (and presumably more or less current wxHTTP-compatible) API
instead of writing a new version. This would almost certainly be easier
than redoing everything.
Anyhow, concerning the API, there are a couple of things you need to take
into account:
1. As mentioned above, we should preserve (maybe not perfect but still)
compatibility with the existing wxHTTP to avoid breaking code using it.
Maybe it can be just implemented on top of the new classes, especially
if they don't reuse the name wxHTTP but are called wxHTTPClient &c.
2. One of the most important things to decide is whether we're going to
provide asynchronous API or just synchronous functions. Maybe we don't
need asynchronous methods because all systems support threads now and
so you can always use synchronous calls from another thread but we do
need to at least think about this.
Regards,
VZ
More information about the wx-dev
mailing list