diff --git a/subprocess.hpp b/subprocess.hpp index 8ebac01..aaed3c7 100755 --- a/subprocess.hpp +++ b/subprocess.hpp @@ -1288,6 +1288,9 @@ public: int send(const char* msg, size_t length) { return stream_.send(msg, length); } + int send(const std::string& msg) + { return send(msg.c_str(), msg.size()); } + int send(const std::vector& msg) { return stream_.send(msg); } @@ -1298,6 +1301,11 @@ public: return res; } + std::pair communicate(const std::string& msg) + { + return communicate(msg.c_str(), msg.size()); + } + std::pair communicate(const std::vector& msg) { auto res = stream_.communicate(msg);