X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/70f8adff2c970496bdc45717cad49ddec0405ae7..59d20816e25f345a8a9cb778f954f1aa955883e6:/projects/stargazer/plugins/other/radius/conn.h diff --git a/projects/stargazer/plugins/other/radius/conn.h b/projects/stargazer/plugins/other/radius/conn.h index 31ebe1dd..38f2db2f 100644 --- a/projects/stargazer/plugins/other/radius/conn.h +++ b/projects/stargazer/plugins/other/radius/conn.h @@ -21,35 +21,35 @@ #ifndef __STG_SGCONFIG_CONN_H__ #define __STG_SGCONFIG_CONN_H__ -#include "stg/os_int.h" +#include -#include #include +class USER; class USERS; +class PLUGIN_LOGGER; namespace STG { +class Config; + class Conn { public: - struct Error : public std::runtime_error - { - Error(const std::string& message) : runtime_error(message.c_str()) {} - }; - - Conn(USERS& users, PLUGIN_LOGGER& logger, const Config& config); + Conn(USERS& users, PLUGIN_LOGGER& logger, const Config& config, int fd, const std::string& remote); ~Conn(); - int sock() const { return m_sock; } + int sock() const; bool read(); + bool tick(); + + bool isOk() const; private: - USERS& m_users; - PLUGIN_LOGGER& m_logger; - const Config& m_config; + class Impl; + boost::scoped_ptr m_impl; }; }