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.
25 lines
497 B
25 lines
497 B
4 years ago
|
#include <smtpd/iosprotocol.hpp>
|
||
4 years ago
|
#include <log.hpp>
|
||
|
|
||
|
#include <iostream>
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
namespace smtpd {
|
||
|
IOSProtocol::IOSProtocol(std::istream & in, std::ostream & out) :
|
||
|
in(in), out(out) { }
|
||
|
|
||
4 years ago
|
void IOSProtocol::emit(string output) {
|
||
4 years ago
|
out << output << endl;
|
||
|
}
|
||
|
|
||
|
void IOSProtocol::run() {
|
||
|
while(!in.eof()) {
|
||
4 years ago
|
string line;
|
||
4 years ago
|
std::getline(in, line);
|
||
|
absorb(line);
|
||
|
}
|
||
|
cerr << "EOF reached" << endl;
|
||
|
}
|
||
|
}
|