CTCPListenSocket.h

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2002 Chris Schoeneman
00004  * 
00005  * This package is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * found in the file COPYING that should have accompanied this file.
00008  * 
00009  * This package is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  */
00014 
00015 #ifndef CTCPLISTENSOCKET_H
00016 #define CTCPLISTENSOCKET_H
00017 
00018 #include "IListenSocket.h"
00019 #include "IArchNetwork.h"
00020 
00021 class CMutex;
00022 class ISocketMultiplexerJob;
00023 
00025 
00028 class CTCPListenSocket : public IListenSocket {
00029 public:
00030     CTCPListenSocket();
00031     ~CTCPListenSocket();
00032 
00033     // ISocket overrides
00034     virtual void        bind(const CNetworkAddress&);
00035     virtual void        close();
00036     virtual void*       getEventTarget() const;
00037 
00038     // IListenSocket overrides
00039     virtual IDataSocket*    accept();
00040 
00041 private:
00042     ISocketMultiplexerJob*
00043                         serviceListening(ISocketMultiplexerJob*,
00044                             bool, bool, bool);
00045 
00046 private:
00047     CArchSocket         m_socket;
00048     CMutex*             m_mutex;
00049 };
00050 
00051 #endif

Generated on Fri Nov 6 00:18:45 2009 for synergy-plus by  doxygen 1.4.7