|
libsshpp v0.1.7
Modern C++17 wrapper for libssh
|
#include <forwarding.hpp>
Public Member Functions | |
| BidirectionalPump (Channel &, int local_fd, std::size_t buffer_size=64 *1024) | |
| ~BidirectionalPump () | |
| BidirectionalPump (const BidirectionalPump &)=delete | |
| BidirectionalPump & | operator= (const BidirectionalPump &)=delete |
| Result< void > | try_run_until_stopped () |
| Drives the pump on the calling thread until both directions reach EOF/close. | |
| void | stop () noexcept |
| bool | finished () const noexcept |
| std::pair< std::uint64_t, std::uint64_t > | byte_counts () const noexcept |
Pairs two byte pumps (fd->channel and channel->fd) with lifetime/EOF handling. Uses the same poll-based pump as LocalForward/RemoteForward so byte_counts() and finished() are always accurate (see the scope note at the top of this file). Deliberately takes no Session& (unlike the design doc's sketch): nothing it does needs one, and callers that only have a Channel (e.g. X11Forwarder) would not be able to supply one.
| SSHPP_INLINE sshpp::BidirectionalPump::BidirectionalPump | ( | Channel & | channel, |
| int | local_fd, | ||
| std::size_t | buffer_size = 64 * 1024 |
||
| ) |
| SSHPP_INLINE sshpp::BidirectionalPump::~BidirectionalPump | ( | ) |
|
delete |
|
delete |
| SSHPP_INLINE Result< void > sshpp::BidirectionalPump::try_run_until_stopped | ( | ) |
Drives the pump on the calling thread until both directions reach EOF/close.
|
noexcept |
|
inlinenoexcept |
|
noexcept |