2 * @file command_receiver.h
3 * @brief l7vsadm message receiver class
5 * L7VSD: Linux Virtual Server for Layer7 Load Balancing
6 * Copyright (C) 2009 NTT COMWARE Corporation.
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23 **********************************************************************/
25 #ifndef COMMAND_RECEIVER_H
26 #define COMMAND_RECEIVER_H
28 #include <boost/asio.hpp>
29 #include <boost/utility.hpp>
30 #include "command_session.h"
35 class command_session;
37 //! @class command_receiver
38 //! @brief l7vsadm message receiver class
39 class command_receiver : private boost::noncopyable{
42 boost::asio::io_service& dispatcher;
44 boost::asio::local::stream_protocol::acceptor acceptor_;
50 //! @brief accept handler
51 //! @param[in] command session
52 //! @param[in] error code
53 void handle_accept( boost::shared_ptr<command_session>, const boost::system::error_code& );
56 //! @brief constructor
57 //! @param[in] io_service
58 //! @param[in] socket file
59 //! @param[in] l7vsd refernce
60 command_receiver( boost::asio::io_service&, const std::string&, l7vsd& );
67 #endif //COMMAND_RECEIVER_H