diff --git a/src/quic/node_quic_socket-inl.h b/src/quic/node_quic_socket-inl.h index 59d5f571ac..18422cd6b2 100644 --- a/src/quic/node_quic_socket-inl.h +++ b/src/quic/node_quic_socket-inl.h @@ -66,7 +66,7 @@ void QuicSocket::AssociateCID( void QuicSocket::DisassociateCID(const QuicCID& cid) { if (cid) { - Debug(this, "Removing association for cid %s", cid.ToHex().c_str()); + Debug(this, "Removing association for cid %s", cid.ToString().c_str()); dcid_to_scid_.erase(cid); } } @@ -74,13 +74,13 @@ void QuicSocket::DisassociateCID(const QuicCID& cid) { void QuicSocket::AssociateStatelessResetToken( const StatelessResetToken& token, BaseObjectPtr session) { - Debug(this, "Associating stateless reset token %s", token.ToHex().c_str()); + Debug(this, "Associating stateless reset token %s", token.ToString().c_str()); token_map_[token] = session; } void QuicSocket::DisassociateStatelessResetToken( const StatelessResetToken& token) { - Debug(this, "Removing stateless reset token %s", token.ToHex().c_str()); + Debug(this, "Removing stateless reset token %s", token.ToString().c_str()); token_map_.erase(token); } diff --git a/src/quic/node_quic_socket.cc b/src/quic/node_quic_socket.cc index 6b58240dfe..69b3c6e02c 100644 --- a/src/quic/node_quic_socket.cc +++ b/src/quic/node_quic_socket.cc @@ -490,7 +490,7 @@ void QuicSocket::OnReceive( // allow us to pass the QuicCID directly to Debug and have it // converted to hex only if the category is enabled so we can // skip committing resources here. - std::string dcid_hex = dcid.ToHex(); + std::string dcid_hex = dcid.ToString(); Debug(this, "Received a QUIC packet for dcid %s", dcid_hex.c_str()); BaseObjectPtr session = FindSession(dcid); diff --git a/src/quic/node_quic_util-inl.h b/src/quic/node_quic_util-inl.h index 793ed75fc4..f4a6f2d527 100644 --- a/src/quic/node_quic_util-inl.h +++ b/src/quic/node_quic_util-inl.h @@ -47,7 +47,7 @@ bool QuicCID::Compare::operator()( false : memcmp(lcid->data, rcid->data, lcid->datalen) == 0; } -std::string QuicCID::ToHex() const { +std::string QuicCID::ToString() const { std::vector dest(ptr_->datalen * 2 + 1); dest[dest.size() - 1] = '\0'; size_t written = StringBytes::hex_encode( @@ -288,7 +288,7 @@ StatelessResetToken::StatelessResetToken( GenerateResetToken(buf_, secret, cid); } -std::string StatelessResetToken::ToHex() const { +std::string StatelessResetToken::ToString() const { std::vector dest(NGTCP2_STATELESS_RESET_TOKENLEN * 2 + 1); dest[dest.size() - 1] = '\0'; size_t written = StringBytes::hex_encode( diff --git a/src/quic/node_quic_util.h b/src/quic/node_quic_util.h index ba66ac96d1..344d55ed8c 100644 --- a/src/quic/node_quic_util.h +++ b/src/quic/node_quic_util.h @@ -224,7 +224,7 @@ class QuicCID : public MemoryRetainer { inline bool operator()(const QuicCID& lcid, const QuicCID& rcid) const; }; - inline std::string ToHex() const; + inline std::string ToString() const; // Copy assignment QuicCID& operator=(const QuicCID& cid) { @@ -307,7 +307,7 @@ class StatelessResetToken : public MemoryRetainer { const uint8_t* token) : token_(token) {} - inline std::string ToHex() const; + inline std::string ToString() const; const uint8_t* data() const { return token_; } struct Hash {