ircproxy The Ultimate Cyborg |
00001 // ircproxy -- An IRC bouncer. 00002 // 00003 //! @file ProxyListenSocket.h 00004 //! @brief This file contains the declaration of class ProxyListenSocket. 00005 // 00006 // Copyright (C) 2006, 2007 by 00007 // 00008 // Carlo Wood, Run on IRC <carlo@alinoe.com> 00009 // RSA-1024 0x624ACAD5 1997-01-26 Sign & Encrypt 00010 // Fingerprint16 = 32 EC A7 B6 AC DB 65 A6 F6 F6 55 DD 1C DC FF 61 00011 // 00012 // This file may be distributed under the terms of the Q Public License 00013 // version 1.0 as appearing in the file LICENSE.QPL included in the 00014 // packaging of this file. 00015 00016 #ifndef PROXYLISTENSOCKET_H 00017 #define PROXYLISTENSOCKET_H 00018 00019 #ifndef USE_PCH 00020 #include <libcw/listen_sock.h> 00021 #include "debug.h" 00022 #endif 00023 00024 class ClientSession; 00025 00026 /*! @brief The listen socket of the application. 00027 * 00028 * This class represents a listen socket through which 00029 * clients may connect to the application. 00030 */ 00031 class ProxyListenSocket : public listen_sock_dtct<ClientSession> { 00032 public: 00033 //! Construct a TCP/IP listen socket object for port \a port. 00034 //! Spawns ClientSession objects. 00035 ProxyListenSocket(unsigned short int port) : listen_sock_dtct<ClientSession>(port, 4) 00036 { Dout(dc::objects, "Constructing ProxyListenSocket(" << port << ")"); } 00037 00038 private: 00039 //! Called when a new connection has been accepted. 00040 void new_connection(ClientSession& client_session); 00041 00042 #ifndef DOXYGEN 00043 // Debugging. 00044 LLISTS_DTOR(ProxyListenSocket) { Dout(dc::objects, "Destructing ProxyListenSocket"); } 00045 #endif 00046 }; 00047 00048 #endif // PROXYLISTENSOCKET_H
Copyright © 2005-2007 Carlo Wood. All rights reserved. |
---|