class TARIFFS;
class ADMIN;
class BASE_PARSER;
+class PLUGIN_LOGGER;
namespace STG
{
};
Conn(const BASE_PARSER::REGISTRY & registry,
- ADMINS & admins, int sock, const sockaddr_in& addr);
+ ADMINS & admins, int sock, const sockaddr_in& addr,
+ PLUGIN_LOGGER & logger);
~Conn();
int Sock() const { return m_sock; }
bool IsDone() const { return m_state == DONE; }
bool IsKeepAlive() const { return m_keepAlive; }
+ void SetKeepAlive() { m_keepAlive = true; }
+
private:
static const char STG_HEADER[5];
char m_cryptoLogin[ADM_LOGIN_LEN]; // Without \0
char m_data[1024];
STG::DECRYPT_STREAM * m_stream;
+ PLUGIN_LOGGER & m_logger;
BASE_PARSER * GetParser(const std::string & tag) const;
bool WriteAnswer(const void* buffer, size_t size);
bool WriteResponse();
+ void Log(const char * file, const std::string & message);
+
struct DataState
{
DataState(bool f, Conn & c) : final(f), conn(c) {}