1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-09 10:00:57 +03:00

Store tokens in new token frames as IoBuf and hexlify when including in qlogger

Summary:
As title. This changes the NewTokenFrame (for writing) to hold the toke as an IOBuf instead of a string. This makes it consistent with the read side.

In the same change, the qlogger now hexlifies this buffer when writing the token to the qlog.

Reviewed By: hanidamlaj, mjoras

Differential Revision: D46955172

fbshipit-source-id: 8f5f575ad2f0a4ec3b4c01cb67defa1f4425cd74
This commit is contained in:
Joseph Beshay
2023-06-27 13:12:10 -07:00
committed by Facebook GitHub Bot
parent e40013d568
commit c3ea605df1
5 changed files with 16 additions and 17 deletions

View File

@@ -464,10 +464,7 @@ void updateHandshakeState(QuicServerConnectionState& conn) {
auto encryptedToken = generator.encryptToken(token);
CHECK(encryptedToken.has_value());
std::string encryptedTokenStr =
encryptedToken.value()->moveToFbString().toStdString();
sendSimpleFrame(conn, NewTokenFrame(std::move(encryptedTokenStr)));
sendSimpleFrame(conn, NewTokenFrame(std::move(encryptedToken.value())));
QUIC_STATS(conn.statsCallback, onNewTokenIssued);
conn.sentNewTokenFrame = true;