initial commit
[raggin.git] / src / server / server.hpp
blob14bfcf8c04631f173b97abb55504f95efe906c88
1 #ifndef server_hpp_INCLUDED
2 #define server_hpp_INCLUDED
4 #include <string>
5 #include <boost/asio.hpp>
6 #include <boost/cstdint.hpp>
7 #include "session.hpp"
10 namespace raggin
12 namespace server
14 class server
16 static const int connect_interval = 10; //Sekunden
17 boost::asio::io_service io_service_;
18 boost::asio::deadline_timer timer_;
19 boost::asio::ip::tcp::endpoint remote_endpoint_; //Beinhaltet den Endpoint zum Connecten.
20 session_ptr session_ptr_;
22 void async_connect(); //Zu Client
23 void handle_async_connect(const boost::system::error_code& error, connection_ptr conn_ptr);
25 public:
26 server(const std::string& ip, boost::uint16_t port);
27 void run();
32 #endif