12 if (interrupting) {
return -1; }
13 while (inputCache.size() < (
unsigned int)b.
length()) {
14 std::cout <<
"*** CHECK OTHER TERMINAL FOR SOMETHING TO TYPE:"
18 std::cin.getline(buf,1000);
19 needInterrupt =
false;
20 if (interrupting) {
return -1; }
23 std::cout <<
"Thank you" << std::endl;
26 inputCache = inputCache.substr(b.
length());
32 while (outputCache.find(
'\n')!=std::string::npos) {
33 size_t idx = outputCache.find(
'\n');
35 show.append(outputCache.c_str(),
idx);
36 std::cout <<
"*** TYPE THIS ON THE OTHER TERMINAL: " <<
show << std::endl;
37 outputCache = outputCache.substr(
idx+1);
void write(const Bytes &b) override
Write a block of bytes to the stream.
A mini-server for performing network communication in the background.
A simple abstraction for a block of bytes.
static void delaySystem(double seconds)