|
libsshpp v0.1.7
Modern C++17 wrapper for libssh
|
One accepted server-side connection. See docs/design/08 §8.4. More...
#include <server_session.hpp>
Public Member Functions | |
| Session ()=default | |
| ~Session () | |
| Session (Session &&) noexcept | |
| Session & | operator= (Session &&) noexcept |
| Session (const Session &)=delete | |
| operator bool () const noexcept | |
| native_session | native_handle () const noexcept |
| Result< void > | try_handle_key_exchange () |
| Performs the SSH transport handshake. Must be called before anything else. | |
| void | set_auth_methods (AuthMethodSet) |
| Result< void > | try_disconnect (std::string_view reason={}) |
| Result< std::string > | try_client_banner () const |
| bool | authenticated () const noexcept |
| const std::string & | user () const noexcept |
| Result< std::optional< Message > > | try_next_message (std::chrono::milliseconds timeout=std::chrono::milliseconds(-1)) |
| nullopt on timeout. Negative timeout blocks indefinitely. | |
| Result< void > | try_set_handler (std::shared_ptr< SessionHandler >) |
| Result< void > | try_attach (Event &event) |
| Result< void > | try_poll (std::chrono::milliseconds timeout) |
| Convenience: try_attach()s a private Event on first use, then polls it. | |
Friends | |
| class | Bind |
| class | Message |
| class | detail::HandlerBridge |
One accepted server-side connection. See docs/design/08 §8.4.
|
default |
|
default |
|
defaultnoexcept |
|
delete |
|
inlineexplicitnoexcept |
|
inlinenoexcept |
| SSHPP_INLINE Result< void > sshpp::server::Session::try_handle_key_exchange | ( | ) |
Performs the SSH transport handshake. Must be called before anything else.
| SSHPP_INLINE void sshpp::server::Session::set_auth_methods | ( | AuthMethodSet | methods | ) |
| SSHPP_INLINE Result< void > sshpp::server::Session::try_disconnect | ( | std::string_view | reason = {} | ) |
| SSHPP_INLINE Result< std::string > sshpp::server::Session::try_client_banner | ( | ) | const |
|
inlinenoexcept |
|
inlinenoexcept |
| SSHPP_INLINE Result< std::optional< Message > > sshpp::server::Session::try_next_message | ( | std::chrono::milliseconds | timeout = std::chrono::milliseconds(-1) | ) |
nullopt on timeout. Negative timeout blocks indefinitely.
| SSHPP_INLINE Result< void > sshpp::server::Session::try_set_handler | ( | std::shared_ptr< SessionHandler > | handler | ) |
Installs the server/channel callback trampolines and drives them via event on subsequent try_poll()/Eventtry_poll() calls. Mixing this with try_next_message() on the same session returns errc::invalid_argument.
| SSHPP_INLINE Result< void > sshpp::server::Session::try_poll | ( | std::chrono::milliseconds | timeout | ) |
Convenience: try_attach()s a private Event on first use, then polls it.
|
friend |
|
friend |
|
friend |