wxWidgets/samples/webrequest
Vadim Zeitlin 970ab0a1ae Make sure wxEVT_WEBREQUEST_DATA is processed in the main thread
This event was processed in a worker thread, which was different from
all the other events and also almost surely not thread-safe, so change
this and queue it for processing in the main thread instead.

Use wxMemoryBuffer instead of non-owning pointer in wxWebRequestEvent
and reset the buffer used internally every time to ensure the data is
still available by the time the event is processed.

Also increase the amount of data downloaded in the "advanced" page of
the sample as it has to be greater than wxWEBREQUEST_BUFFER_SIZE, which
is currently 64KiB, to have a chance of seeing the value actually
change, otherwise all the data arrives in a single event. As it is,
using the maximal size supported by the httpbin service, we only get 2
events.
2021-01-16 23:53:15 +01:00
..
makefile.bcc
makefile.gcc
Makefile.in
makefile.unx
makefile.vc
webrequest_vc7.vcproj
webrequest_vc8.vcproj
webrequest_vc9.vcproj
webrequest.bkl
webrequest.cpp Make sure wxEVT_WEBREQUEST_DATA is processed in the main thread 2021-01-16 23:53:15 +01:00