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

#include <message.hpp>

Public Member Functions

 Message ()=default
 
 ~Message ()
 
 Message (Message &&) noexcept
 
Messageoperator= (Message &&) noexcept
 
 Message (const Message &)=delete
 
 operator bool () const noexcept
 
MessageType type () const noexcept
 
AuthSubtype auth_subtype () const noexcept
 
ChannelOpenSubtype channel_open_subtype () const noexcept
 
ChannelRequestSubtype channel_request_subtype () const noexcept
 
std::string_view auth_user () const noexcept
 
SecureString auth_password () const
 
PublicKeyState auth_public_key_state () const noexcept
 
Key auth_public_key () const
 The offered/verified key. Borrowed: valid only for this message's lifetime.
 
Result< void > try_reply_auth_success ()
 
Result< void > try_reply_auth_failure (bool partial=false)
 
Result< void > try_reply_auth_pk_ok ()
 Tells the client its offered key is acceptable; signature not yet required.
 
Result< void > try_reply_default ()
 
Result< Channeltry_accept_channel_open ()
 Accepts the channel-open request and returns the resulting Channel.
 
std::string_view exec_command () const noexcept
 
std::string_view subsystem_name () const noexcept
 
std::pair< std::string_view, std::string_view > env_pair () const noexcept
 
Result< void > try_reply_success ()
 
Result< void > try_reply_failure ()
 

Friends

class Session
 

Detailed Description

One pulled protocol message (ssh_message_get()). Exactly one reply must be sent per message; the destructor sends a default (deny) reply if the caller forgot, so a missing reply becomes a clear failure rather than a hung client. See docs/design/08 ยง8.5.

Constructor & Destructor Documentation

◆ Message() [1/3]

sshpp::server::Message::Message ( )
default

◆ ~Message()

SSHPP_INLINE sshpp::server::Message::~Message ( )

◆ Message() [2/3]

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

◆ Message() [3/3]

sshpp::server::Message::Message ( const Message )
delete

Member Function Documentation

◆ operator=()

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

◆ operator bool()

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

◆ type()

SSHPP_INLINE MessageType sshpp::server::Message::type ( ) const
noexcept

◆ auth_subtype()

SSHPP_INLINE AuthSubtype sshpp::server::Message::auth_subtype ( ) const
noexcept

◆ channel_open_subtype()

SSHPP_INLINE ChannelOpenSubtype sshpp::server::Message::channel_open_subtype ( ) const
noexcept

◆ channel_request_subtype()

SSHPP_INLINE ChannelRequestSubtype sshpp::server::Message::channel_request_subtype ( ) const
noexcept

◆ auth_user()

SSHPP_INLINE std::string_view sshpp::server::Message::auth_user ( ) const
noexcept

◆ auth_password()

SSHPP_INLINE SecureString sshpp::server::Message::auth_password ( ) const

◆ auth_public_key_state()

SSHPP_INLINE PublicKeyState sshpp::server::Message::auth_public_key_state ( ) const
noexcept

◆ auth_public_key()

SSHPP_INLINE Key sshpp::server::Message::auth_public_key ( ) const

The offered/verified key. Borrowed: valid only for this message's lifetime.

◆ try_reply_auth_success()

SSHPP_INLINE Result< void > sshpp::server::Message::try_reply_auth_success ( )

◆ try_reply_auth_failure()

SSHPP_INLINE Result< void > sshpp::server::Message::try_reply_auth_failure ( bool  partial = false)

◆ try_reply_auth_pk_ok()

SSHPP_INLINE Result< void > sshpp::server::Message::try_reply_auth_pk_ok ( )

Tells the client its offered key is acceptable; signature not yet required.

◆ try_reply_default()

SSHPP_INLINE Result< void > sshpp::server::Message::try_reply_default ( )

◆ try_accept_channel_open()

SSHPP_INLINE Result< Channel > sshpp::server::Message::try_accept_channel_open ( )

Accepts the channel-open request and returns the resulting Channel.

◆ exec_command()

SSHPP_INLINE std::string_view sshpp::server::Message::exec_command ( ) const
noexcept

◆ subsystem_name()

SSHPP_INLINE std::string_view sshpp::server::Message::subsystem_name ( ) const
noexcept

◆ env_pair()

SSHPP_INLINE std::pair< std::string_view, std::string_view > sshpp::server::Message::env_pair ( ) const
noexcept

◆ try_reply_success()

SSHPP_INLINE Result< void > sshpp::server::Message::try_reply_success ( )

◆ try_reply_failure()

SSHPP_INLINE Result< void > sshpp::server::Message::try_reply_failure ( )

Friends And Related Symbol Documentation

◆ Session

friend class Session
friend

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