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

The listening server socket. See docs/design/08 §8.3. More...

#include <bind.hpp>

Public Member Functions

 Bind ()=default
 
 Bind (const BindOptions &)
 
 ~Bind ()
 
 Bind (Bind &&) noexcept
 
Bindoperator= (Bind &&) noexcept
 
 Bind (const Bind &)=delete
 
 operator bool () const noexcept
 
native_bind native_handle () const noexcept
 
Result< void > try_listen ()
 
std::uint16_t local_port () const noexcept
 
int fd () const noexcept
 
Result< Sessiontry_accept ()
 Blocking accept. The returned session has NOT completed key exchange yet.
 
Result< std::optional< Session > > try_accept (std::chrono::milliseconds timeout)
 Blocks up to timeout; nullopt on timeout.
 

Detailed Description

The listening server socket. See docs/design/08 §8.3.

Constructor & Destructor Documentation

◆ Bind() [1/4]

sshpp::server::Bind::Bind ( )
default

◆ Bind() [2/4]

SSHPP_INLINE sshpp::server::Bind::Bind ( const BindOptions opts)
explicit

◆ ~Bind()

SSHPP_INLINE sshpp::server::Bind::~Bind ( )

◆ Bind() [3/4]

SSHPP_INLINE sshpp::server::Bind::Bind ( Bind &&  other)
noexcept

◆ Bind() [4/4]

sshpp::server::Bind::Bind ( const Bind )
delete

Member Function Documentation

◆ operator=()

SSHPP_INLINE Bind & sshpp::server::Bind::operator= ( Bind &&  other)
noexcept

◆ operator bool()

sshpp::server::Bind::operator bool ( ) const
inlineexplicitnoexcept

◆ native_handle()

native_bind sshpp::server::Bind::native_handle ( ) const
inlinenoexcept

◆ try_listen()

SSHPP_INLINE Result< void > sshpp::server::Bind::try_listen ( )

◆ local_port()

std::uint16_t sshpp::server::Bind::local_port ( ) const
inlinenoexcept

◆ fd()

SSHPP_INLINE int sshpp::server::Bind::fd ( ) const
noexcept

◆ try_accept() [1/2]

SSHPP_INLINE Result< Session > sshpp::server::Bind::try_accept ( )

Blocking accept. The returned session has NOT completed key exchange yet.

◆ try_accept() [2/2]

SSHPP_INLINE Result< std::optional< Session > > sshpp::server::Bind::try_accept ( std::chrono::milliseconds  timeout)

Blocks up to timeout; nullopt on timeout.


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