1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-03-13 08:11:11 +00:00

const ExtractString and ExtractMapping

This commit is contained in:
orignal 2025-02-19 18:51:54 -05:00
parent aedf59d11a
commit b97f09cc95
2 changed files with 4 additions and 4 deletions

View File

@ -571,7 +571,7 @@ namespace client
m_IsSending = false;
}
std::string_view I2CPSession::ExtractString (const uint8_t * buf, size_t len)
std::string_view I2CPSession::ExtractString (const uint8_t * buf, size_t len) const
{
uint8_t l = buf[0];
if (l > len) l = len;
@ -588,7 +588,7 @@ namespace client
return l + 1;
}
void I2CPSession::ExtractMapping (const uint8_t * buf, size_t len, std::map<std::string, std::string>& mapping)
void I2CPSession::ExtractMapping (const uint8_t * buf, size_t len, std::map<std::string, std::string>& mapping) const
// TODO: move to Base.cpp
{
size_t offset = 0;

View File

@ -194,9 +194,9 @@ namespace client
void HandleI2CPMessageSent (const boost::system::error_code& ecode, std::size_t bytes_transferred);
std::string_view ExtractString (const uint8_t * buf, size_t len);
std::string_view ExtractString (const uint8_t * buf, size_t len) const;
size_t PutString (uint8_t * buf, size_t len, std::string_view str);
void ExtractMapping (const uint8_t * buf, size_t len, std::map<std::string, std::string>& mapping);
void ExtractMapping (const uint8_t * buf, size_t len, std::map<std::string, std::string>& mapping) const;
void SendSessionStatusMessage (I2CPSessionStatus status);
void SendHostReplyMessage (uint32_t requestID, std::shared_ptr<const i2p::data::IdentityEx> identity);