Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
Jeff Becker 4244345eff
more
2018-05-06 09:53:03 -04:00

30 lines
487 B
C++

#ifndef NNTPCHAN_LINE_HPP
#define NNTPCHAN_LINE_HPP
#include "server.hpp"
#include <stdint.h>
#include <sstream>
namespace nntpchan
{
/** @brief a buffered line reader */
class LineReader
{
public:
/** @brief queue inbound data from connection */
void Data(const char *data, ssize_t s);
protected:
/** @brief handle a line from the client */
virtual void HandleLine(const std::string line) = 0;
private:
std::stringstream m_line;
std::string m_leftover;
};
}
#endif