diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-09-15 16:40:14 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2015-09-15 16:40:14 +0300 |
commit | acfde068698184249e50e0781a22bb38ba87cf3f (patch) | |
tree | eef3bdf99293fcd6fcff58ac1d44655b7b13325c /server/include/server_session.h | |
parent | 2f31b8c66a8f3931e1c9ee0c5b9adebf341bee9a (diff) |
codelite projects
Diffstat (limited to 'server/include/server_session.h')
-rw-r--r-- | server/include/server_session.h | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/server/include/server_session.h b/server/include/server_session.h index 07e8fcd..436c4ee 100644 --- a/server/include/server_session.h +++ b/server/include/server_session.h @@ -1,5 +1,5 @@ /* - Copyright © 2015 Gluzskiy Alexandr (sss) + Copyright © 2015 Gluzskiy Alexandr (sss) This file is part of Unknown Download Manager (UDM). @@ -18,7 +18,6 @@ */ - #ifndef SERVER_SESSION_H #define SERVER_SESSION_H @@ -34,33 +33,37 @@ class socket_wraper; class server_session { - public: - server_session(boost::asio::io_service &s, runtime_config_s &config, std::map<std::string, client*> &clients_, std::map<int, download_internal_s> &downloads, boost::asio::ssl::context *c = nullptr); - void run(); - void send_message(server_msg *msg); - socket_wraper* socket(); - virtual ~server_session(); - protected: - private: - //net - void handle_read(const boost::system::error_code& error, size_t bytes_transferred); - void handle_write(const boost::system::error_code& error); - void handle_write_no_read(const boost::system::error_code& error); - void handle_handshake(const boost::system::error_code& error); - bool handle_command(client_msg *msg); +public: + server_session(boost::asio::io_service& s, + runtime_config_s& config, + std::map<std::string, client*>& clients_, + std::map<int, download_internal_s>& downloads, + boost::asio::ssl::context* c = nullptr); + void run(); + void send_message(server_msg* msg); + socket_wraper* socket(); + virtual ~server_session(); +protected: +private: + server_session(const server_session&) = delete; + // net + void handle_read(const boost::system::error_code& error, size_t bytes_transferred); + void handle_write(const boost::system::error_code& error); + void handle_write_no_read(const boost::system::error_code& error); + void handle_handshake(const boost::system::error_code& error); + bool handle_command(client_msg* msg); - char *recv_data_; - socket_wraper *socket_; - boost::asio::io_service &io_service_; - boost::asio::ssl::context *context_; - std::string client_auth_token; - runtime_config_s &runtime_config; - std::map<std::string, client*> &clients; - client *client_; - std::map<int, download_internal_s> &downloads; - //TODO: store client ptr + char* recv_data_ = nullptr; + socket_wraper* socket_ = nullptr; + boost::asio::io_service& io_service_; + boost::asio::ssl::context* context_; + std::string client_auth_token; + runtime_config_s& runtime_config; + std::map<std::string, client*>& clients; + client* client_ = nullptr; + std::map<int, download_internal_s>& downloads; + // TODO: store client ptr }; - #endif // SERVER_SESSION_H |