libsshpp v0.1.7
Modern C++17 wrapper for libssh
Loading...
Searching...
No Matches
sshpp::scp::Reader Class Reference

Pull side of an SCP transfer: scp -f as seen by the client. More...

#include <scp.hpp>

Public Member Functions

 Reader ()=default
 
 Reader (Session &session, const RemotePath &location, bool recursive)
 
 ~Reader ()
 
 Reader (Reader &&) noexcept
 
Readeroperator= (Reader &&) noexcept
 
 Reader (const Reader &)=delete
 
 operator bool () const noexcept
 
Result< void > try_init ()
 
Result< std::optional< Request > > try_next ()
 nullopt when the transfer is complete (SSH_SCP_REQUEST_EOF).
 
Result< void > try_accept ()
 
Result< void > try_deny (std::string_view reason)
 
Result< std::size_t > try_read (MutableByteView)
 
Result< std::uint64_t > try_read_to (std::ostream &, ProgressCallback={})
 

Detailed Description

Pull side of an SCP transfer: scp -f as seen by the client.

Constructor & Destructor Documentation

◆ Reader() [1/4]

sshpp::scp::Reader::Reader ( )
default

◆ Reader() [2/4]

SSHPP_INLINE sshpp::scp::Reader::Reader ( Session session,
const RemotePath location,
bool  recursive 
)

◆ ~Reader()

SSHPP_INLINE sshpp::scp::Reader::~Reader ( )

◆ Reader() [3/4]

SSHPP_INLINE sshpp::scp::Reader::Reader ( Reader &&  other)
noexcept

◆ Reader() [4/4]

sshpp::scp::Reader::Reader ( const Reader )
delete

Member Function Documentation

◆ operator=()

SSHPP_INLINE Reader & sshpp::scp::Reader::operator= ( Reader &&  other)
noexcept

◆ operator bool()

sshpp::scp::Reader::operator bool ( ) const
inlineexplicitnoexcept

◆ try_init()

SSHPP_INLINE Result< void > sshpp::scp::Reader::try_init ( )

◆ try_next()

SSHPP_INLINE Result< std::optional< Request > > sshpp::scp::Reader::try_next ( )

nullopt when the transfer is complete (SSH_SCP_REQUEST_EOF).

◆ try_accept()

SSHPP_INLINE Result< void > sshpp::scp::Reader::try_accept ( )

◆ try_deny()

SSHPP_INLINE Result< void > sshpp::scp::Reader::try_deny ( std::string_view  reason)

◆ try_read()

SSHPP_INLINE Result< std::size_t > sshpp::scp::Reader::try_read ( MutableByteView  buf)

◆ try_read_to()

SSHPP_INLINE Result< std::uint64_t > sshpp::scp::Reader::try_read_to ( std::ostream &  out,
ProgressCallback  progress = {} 
)

The documentation for this class was generated from the following files: