Make networking more thread safe.
commit8137b217ef512355209437efb3e1ee403f4d62cd
authorDavid Brodsky <trekie@sinister.cz>
Tue, 8 Aug 2006 17:06:58 +0000 (8 19:06 +0200)
committerDavid Brodsky <trekie@sinister.cz>
Tue, 8 Aug 2006 17:06:58 +0000 (8 19:06 +0200)
tree8343ee3b860c070bbbea229167c948e0629454bf
parente732a7e6287a5ca289aab175c002b5f4126e46d2
Make networking more thread safe.

Reading and writing to a socket should be done only in one thread. If an error
occurs during these two operations an exception is thrown and the socket should
be closed after catching the exception. The socket deletes itself after closing
on a safe place so there is only one safe and single point of deletion. If an
error occurs during polling then a signal is emitted and the socket should be
cosed after receiving that signal. Any pending and undelivered signals are
disabled so that there should be no errors caused by writing to such socket.
src/net-core/deleter.h [new file with mode: 0644]
src/net-core/poll.cpp
src/net-core/poll.h
src/net-core/socket.cpp
src/net-core/socket.h
src/net-http/httpclient.cpp