|
libsshpp v0.1.7
Modern C++17 wrapper for libssh
|
#include <exec.hpp>
Public Member Functions | |
| Exec (Session &session) | |
| Exec & | env (std::string_view name, std::string_view value) |
| Exec & | pty (bool enable=true, std::string_view term="xterm-256color", PtySize size={}) |
| Exec & | stdin_data (std::string data) |
| Exec & | timeout (std::chrono::milliseconds t) |
| Exec & | max_output (std::size_t bytes) |
| Exec & | merge_stderr (bool v=true) |
| Exec & | sink (OutputSink s) |
| Result< ExecResult > | try_run (std::string_view command) |
| ExecResult | run (std::string_view command) |
| Result< ExecResult > | try_run (const std::vector< std::string > &argv) |
| Builds an argv-style command with correct POSIX shell quoting. | |
One-shot remote command execution: opens a channel, requests exec, pumps stdout/stderr without stalling on the interleaving hazard, waits for exit. See docs/design/05 ยง5.3.
|
inlineexplicit |
| SSHPP_INLINE Exec & sshpp::Exec::env | ( | std::string_view | name, |
| std::string_view | value | ||
| ) |
| SSHPP_INLINE Exec & sshpp::Exec::pty | ( | bool | enable = true, |
| std::string_view | term = "xterm-256color", |
||
| PtySize | size = {} |
||
| ) |
| SSHPP_INLINE Exec & sshpp::Exec::stdin_data | ( | std::string | data | ) |
|
inline |
|
inline |
|
inline |
|
inline |
| SSHPP_INLINE Result< ExecResult > sshpp::Exec::try_run | ( | std::string_view | command | ) |
| SSHPP_INLINE ExecResult sshpp::Exec::run | ( | std::string_view | command | ) |
| SSHPP_INLINE Result< ExecResult > sshpp::Exec::try_run | ( | const std::vector< std::string > & | argv | ) |
Builds an argv-style command with correct POSIX shell quoting.