Create Popen::communicate overload for std::string

This commit is contained in:
Mikhail Sokolovskiy 2022-06-20 21:37:49 +03:00
parent cbc9e82158
commit 3ddc0fcd9a

View File

@ -1298,6 +1298,11 @@ public:
return res; return res;
} }
std::pair<OutBuffer, ErrBuffer> communicate(const std::string& msg)
{
return communicate(msg.c_str(), msg.size());
}
std::pair<OutBuffer, ErrBuffer> communicate(const std::vector<char>& msg) std::pair<OutBuffer, ErrBuffer> communicate(const std::vector<char>& msg)
{ {
auto res = stream_.communicate(msg); auto res = stream_.communicate(msg);