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:
parent
aedf59d11a
commit
b97f09cc95
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user