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

#include <forwarding.hpp>

Public Member Functions

 RemoteForwardListener ()=default
 
 ~RemoteForwardListener ()
 
 RemoteForwardListener (RemoteForwardListener &&) noexcept
 
RemoteForwardListeneroperator= (RemoteForwardListener &&) noexcept
 
 RemoteForwardListener (const RemoteForwardListener &)=delete
 
 operator bool () const noexcept
 
std::uint16_t bound_port () const noexcept
 
Result< std::optional< IncomingForward > > try_accept (std::chrono::milliseconds timeout)
 Blocks up to timeout; nullopt on timeout.
 
Result< void > try_cancel ()
 

Static Public Member Functions

static Result< RemoteForwardListenercreate (Session &, std::string_view bind_address, std::uint16_t port)
 

Constructor & Destructor Documentation

◆ RemoteForwardListener() [1/3]

sshpp::RemoteForwardListener::RemoteForwardListener ( )
default

◆ ~RemoteForwardListener()

SSHPP_INLINE sshpp::RemoteForwardListener::~RemoteForwardListener ( )

◆ RemoteForwardListener() [2/3]

SSHPP_INLINE sshpp::RemoteForwardListener::RemoteForwardListener ( RemoteForwardListener &&  other)
noexcept

◆ RemoteForwardListener() [3/3]

sshpp::RemoteForwardListener::RemoteForwardListener ( const RemoteForwardListener )
delete

Member Function Documentation

◆ operator=()

SSHPP_INLINE RemoteForwardListener & sshpp::RemoteForwardListener::operator= ( RemoteForwardListener &&  other)
noexcept

◆ create()

SSHPP_INLINE Result< RemoteForwardListener > sshpp::RemoteForwardListener::create ( Session session,
std::string_view  bind_address,
std::uint16_t  port 
)
static

bind_address: "" = all interfaces (server policy permitting), "localhost", an IP. port 0 asks the server to allocate one; read it back with bound_port().

◆ operator bool()

sshpp::RemoteForwardListener::operator bool ( ) const
inlineexplicitnoexcept

◆ bound_port()

std::uint16_t sshpp::RemoteForwardListener::bound_port ( ) const
inlinenoexcept

◆ try_accept()

SSHPP_INLINE Result< std::optional< IncomingForward > > sshpp::RemoteForwardListener::try_accept ( std::chrono::milliseconds  timeout)

Blocks up to timeout; nullopt on timeout.

◆ try_cancel()

SSHPP_INLINE Result< void > sshpp::RemoteForwardListener::try_cancel ( )

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