* fhandler.h (class fhandler_socket): Add private mutex handle

accept_mtx.
	* fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
	accept_mtx to NULL.
	(fhandler_socket::dup): Duplicate accept_mtx, if available.
	(fhandler_socket::listen): Create accept_mtx before trying to listen.
	(fhandler_socket::prepare): Wait for accept_mtx if available to
	serialize accepts on the same socket.
	(fhandler_socket::release): Release accept_mtx.
	(fhandler_socket::close): Close accept_mtx on successful closesocket.
This commit is contained in:
Corinna Vinschen
2006-06-14 20:19:10 +00:00
parent 6976c28f87
commit 1b9cba59c3
3 changed files with 49 additions and 1 deletions

View File

@ -381,6 +381,7 @@ class fhandler_mailslot : public fhandler_base
class fhandler_socket: public fhandler_base
{
private:
HANDLE accept_mtx;
int addr_family;
int type;
int connect_secret[4];