00001 // 00002 // plumbing - C++ wrapper facades for Berkeley sockets 00003 // Copyright (C) 2009 Peter Miller 00004 // 00005 // This program is free software; you can redistribute it and/or modify it 00006 // under the terms of the GNU General Public License, version 3, as published 00007 // by the Free Software Foundation. 00008 // 00009 // This program is distributed in the hope that it will be useful, but WITHOUT 00010 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00012 // more details. 00013 // 00014 // You should have received a copy of the GNU General Public License along 00015 // with this program. If not, see <http://www.gnu.org/licenses/>. 00016 // 00017 00018 #ifndef LIBPLUMBING_ENDPOINT_LISTENER_CHARGEN_H 00019 #define LIBPLUMBING_ENDPOINT_LISTENER_CHARGEN_H 00020 00021 #include <boost/shared_ptr.hpp> 00022 #include <libplumbing/endpoint/listener.h> 00023 00024 namespace plumbing { 00025 00031 class endpoint_listener_chargen: 00032 public endpoint_listener 00033 { 00034 public: 00038 virtual ~endpoint_listener_chargen(); 00039 00040 private: 00054 endpoint_listener_chargen(reactor &svc, const std::string &port_number, 00055 int repeat_count = -1); 00056 00057 public: 00071 static pointer create(reactor &svc, const std::string &port_number = "", 00072 int repeat_count = -1); 00073 00074 protected: 00075 // See base class for documentation. 00076 int get_default_port() const; 00077 00078 // See base class for documentation. 00079 endpoint::pointer endpoint_factory(int fd, void *adr, int adrlen); 00080 00081 private: 00085 endpoint_listener_chargen(); 00086 00093 endpoint_listener_chargen(const endpoint_listener_chargen &rhs); 00094 00101 endpoint_listener_chargen &operator=(const endpoint_listener_chargen &rhs); 00102 }; 00103 00104 } 00105 00106 #endif // LIBPLUMBING_ENDPOINT_LISTENER_CHARGEN_H 00107 // vim: set ts=8 sw=4 et