[wx-discuss] wxSocket rewrite using Boost.Asio
Vadim Zeitlin
vadim at wxwidgets.org
Fri May 23 12:21:41 PDT 2008
On Fri, 23 May 2008 12:00:45 -0700 "William H. Schultz" <whschultz at cedrus.com> wrote:
WHS> I'm not convinced that the existing implementation necessarily
WHS> preserves 90% of the API.
Err, I don't really understand this. Anyhow, just to make clear what I
meant: we need to be able to support all these weird wxSocket flags (BLOCK
&c).
WHS> Last I checked, IPv6 wasn't available.
There is (untested by me personally) IPv6 support now but what does this
have to do with compatibility anyhow?
WHS> A big problem I've had is that "blocking" operations don't block.
WHS> They don't return, but they don't block either--they chew up 100% of
WHS> the CPU.
I'm pretty sure this is due to the incorrect use of wxSocket which was
discussed to death on wx-users in the past. See the last message in the
"bringing wxSocket into shape" thread on wx-dev from Kevin Hock from
2007-12-22 for more explanations.
WHS> >> However I imagine that not everybody would be happy with requiring
WHS> >> Boost
WHS>
WHS> See: http://www.boost.org/doc/libs/1_35_0/tools/bcp/bcp.html
Requiring (relatively big) part of Boost is not very different from
requiring all of it (speaking about the headers, anyhow, but it seems that
ASIO can be used without any other Boost libraries). Anyhow, if we use ASIO
for wxSocket it may make sense to also use other Boost classes.
WHS> wxWidgets 3.0 is supposed to be a major upgrade, right? Wouldn't that
WHS> make it a good time to drop support for old and broken compilers and
WHS> make major leaps forward in ease of programming?
I'm actually ok with dropping support for VC6, you need to convince Julian
and all the others who continue to use it.
But this still leaves the need to implement the baroque wxSocket API on
top of a rather different ASIO one. I'm sure that if you do it and provide
it in a usable form somewhere it will be very useful to a lot of people
whether or not it's included in wx itself. And sooner or later we will drop
VC6, of course, so we would be able to include it then. So I definitely
support the idea of doing it, I just can't promise that it is integrated
into wx 3.0 because it's not [only] my decision.
Regards,
VZ
More information about the wx-discuss
mailing list