You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
497 B
24 lines
497 B
#include <smtpd/iosprotocol.hpp>
|
|
#include <log.hpp>
|
|
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
namespace smtpd {
|
|
IOSProtocol::IOSProtocol(std::istream & in, std::ostream & out) :
|
|
in(in), out(out) { }
|
|
|
|
void IOSProtocol::emit(string output) {
|
|
out << output << endl;
|
|
}
|
|
|
|
void IOSProtocol::run() {
|
|
while(!in.eof()) {
|
|
string line;
|
|
std::getline(in, line);
|
|
absorb(line);
|
|
}
|
|
cerr << "EOF reached" << endl;
|
|
}
|
|
}
|
|
|