yo/concrete/examples/monitor/sendchild.cc
raw| 1 | #include "monitor.ih" |
| 2 | //SEND |
| 3 | void Monitor::sendChild(int nr, string const &line) |
| 4 | { |
| 5 | auto it = find_if(d_child.begin(), d_child.end(), Find(nr)); |
| 6 | |
| 7 | if (it == d_child.end()) |
| 8 | cerr << "No child number " << nr << '\n'; |
| 9 | else |
| 10 | { |
| 11 | OFdnStreambuf ofdn{ it->second->writeFd() }; |
| 12 | ostream out(&ofdn); |
| 13 | |
| 14 | out << line << '\n'; |
| 15 | } |
| 16 | } |
| 17 | //= |