wxWidgets/samples/sockets
Vadim Zeitlin d421373c2e Use blocking sockets from non-main threads in wxProtocol.
Non-blocking sockets can't work in worker threads without additional locking
as they generate events that can be dispatched from the main thread after the
socket object, created in the worker thread, is already destroyed, so don't
even attempt to use them if wxProtocol object is created from non-main thread.

Also simplify the code by removing the calls to SetFlags(), Notify() and
{Save,Restore}State() and simply put the socket from the beginning in
blocking, wait all mode that it needs to be in.

This, with the fixes in the previous commit, allows wxHTTP and wxFTP to work
from worker threads too.

Test using wxHTTP from a worker thread in the socket client sample.

Closes #17031.
2015-07-05 16:45:07 +02:00
..
baseclient.cpp Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
baseserver.cpp Fix progress logging in the console socket server sample. 2015-04-24 00:20:33 +02:00
client.cpp Use blocking sockets from non-main threads in wxProtocol. 2015-07-05 16:45:07 +02:00
descrip.mms
makefile.bcc Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
makefile.gcc Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
Makefile.in
makefile.unx
makefile.vc Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
server.cpp Use wx-prefixed macros throughout the repository. 2015-04-23 22:00:35 +04:00
sockets_vc7_baseclient.vcproj Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
sockets_vc7_baseserver.vcproj Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
sockets_vc7_client.vcproj Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
sockets_vc7_server.vcproj Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
sockets_vc8_baseclient.vcproj Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
sockets_vc8_baseserver.vcproj Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
sockets_vc8_client.vcproj Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
sockets_vc8_server.vcproj Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
sockets_vc9_baseclient.vcproj Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
sockets_vc9_baseserver.vcproj Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
sockets_vc9_client.vcproj Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
sockets_vc9_server.vcproj Convert really all CRLF files to use LF in the git repository. 2015-03-19 21:09:08 +01:00
sockets.bkl