|
libsshpp v0.1.7
Modern C++17 wrapper for libssh
|
#include <channel.hpp>
Public Member Functions | |
| Channel ()=default | |
| ~Channel () | |
| Channel (Channel &&) noexcept | |
| Channel & | operator= (Channel &&) noexcept |
| Channel (const Channel &)=delete | |
| Channel & | operator= (const Channel &)=delete |
| operator bool () const noexcept | |
| native_channel | native_handle () const noexcept |
| std::recursive_mutex & | session_mutex () const noexcept |
| Result< void > | try_open_session () |
| bool | is_open () const noexcept |
| Result< void > | try_request_pty (std::string_view term="xterm-256color", PtySize={}) |
| Result< void > | try_change_pty_size (PtySize) |
| Result< void > | try_request_shell () |
| Result< void > | try_request_exec (std::string_view command) |
| Result< void > | try_request_subsystem (std::string_view name) |
| Result< void > | try_request_env (std::string_view name, std::string_view value) |
| Result< void > | try_send_signal (Signal) |
| Result< std::size_t > | try_read_some (MutableByteView buf, Stream=Stream::stdout_) |
| Result< std::size_t > | try_read_some (MutableByteView buf, Stream, std::chrono::milliseconds timeout) |
| Result< std::string > | try_read_all (Stream=Stream::stdout_, std::size_t limit=64u<< 20) |
| Result< std::size_t > | try_write_some (ByteView data) |
| Result< std::size_t > | try_write_some (ByteView data, Stream stream) |
| Result< void > | try_write_all (ByteView data) |
| Result< void > | try_write_all (ByteView data, Stream stream) |
| Result< void > | try_write_all (std::string_view data) |
| Result< void > | try_write_all (std::string_view data, Stream stream) |
| Result< std::size_t > | try_bytes_available (Stream=Stream::stdout_) const |
| Result< bool > | try_wait_readable (std::chrono::milliseconds, Stream=Stream::stdout_) |
| Result< void > | try_send_eof () |
| bool | is_eof () const noexcept |
| Result< void > | try_close () |
| bool | is_closed () const noexcept |
| Result< ExitState > | try_wait_exit (std::chrono::milliseconds timeout=std::chrono::milliseconds::max()) |
| ExitState | exit_state () const noexcept |
Static Public Member Functions | |
| static Channel | from_native (native_channel, detail::SessionCorePtr, Ownership) |
Friends | |
| class | Session |
A single SSH channel: exec/shell/pty/subsystem I/O multiplexed over a Session. See docs/design/05 ยง5.1.
|
default |
| SSHPP_INLINE sshpp::Channel::~Channel | ( | ) |
|
noexcept |
|
delete |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
static |
|
inlinenoexcept |
The owning Session's recursive mutex. For advanced multi-threaded use only (e.g. a dedicated per-subsystem thread doing raw, synchronous libssh calls that must not interleave with a concurrent Event/message poll loop on the same underlying ssh_session - see SftpSubsystemHandler).
| SSHPP_INLINE Result< void > sshpp::Channel::try_open_session | ( | ) |
|
inlinenoexcept |
| SSHPP_INLINE Result< void > sshpp::Channel::try_request_pty | ( | std::string_view | term = "xterm-256color", |
| PtySize | size = {} |
||
| ) |
| SSHPP_INLINE Result< void > sshpp::Channel::try_request_shell | ( | ) |
| SSHPP_INLINE Result< void > sshpp::Channel::try_request_exec | ( | std::string_view | command | ) |
| SSHPP_INLINE Result< void > sshpp::Channel::try_request_subsystem | ( | std::string_view | name | ) |
| SSHPP_INLINE Result< void > sshpp::Channel::try_request_env | ( | std::string_view | name, |
| std::string_view | value | ||
| ) |
| SSHPP_INLINE Result< std::size_t > sshpp::Channel::try_read_some | ( | MutableByteView | buf, |
| Stream | stream = Stream::stdout_ |
||
| ) |
| SSHPP_INLINE Result< std::size_t > sshpp::Channel::try_read_some | ( | MutableByteView | buf, |
| Stream | stream, | ||
| std::chrono::milliseconds | timeout | ||
| ) |
| SSHPP_INLINE Result< std::string > sshpp::Channel::try_read_all | ( | Stream | stream = Stream::stdout_, |
| std::size_t | limit = 64u << 20 |
||
| ) |
| SSHPP_INLINE Result< void > sshpp::Channel::try_write_all | ( | std::string_view | data | ) |
| SSHPP_INLINE Result< std::size_t > sshpp::Channel::try_bytes_available | ( | Stream | stream = Stream::stdout_ | ) | const |
| SSHPP_INLINE Result< bool > sshpp::Channel::try_wait_readable | ( | std::chrono::milliseconds | timeout, |
| Stream | stream = Stream::stdout_ |
||
| ) |
| SSHPP_INLINE Result< void > sshpp::Channel::try_send_eof | ( | ) |
|
noexcept |
| SSHPP_INLINE Result< void > sshpp::Channel::try_close | ( | ) |
|
inlinenoexcept |
| SSHPP_INLINE Result< ExitState > sshpp::Channel::try_wait_exit | ( | std::chrono::milliseconds | timeout = std::chrono::milliseconds::max() | ) |
|
noexcept |
|
friend |