Skip to content

Commit

Permalink
Expose zeroRttRejected in QuicClientTransport
Browse files Browse the repository at this point in the history
Summary: So users can query it.

Reviewed By: jbeshay

Differential Revision: D49075764

fbshipit-source-id: 251030e7659000cd78e0086aac801ebe071cc709
  • Loading branch information
kvtsoy authored and facebook-github-bot committed Sep 13, 2023
1 parent 1b02218 commit 07a2ee7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions quic/client/QuicClientTransport.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,22 @@ class QuicClientTransport
*/
bool isTLSResumed() const;

enum class ZeroRttAttemptState : uint8_t {
NotAttempted = 0,
Accepted,
Rejected
};
/**
* Returns the state of the 0RTT attempt if there was one.
*/
ZeroRttAttemptState getZeroRttState() {
if (!clientConn_->zeroRttRejected.has_value()) {
return ZeroRttAttemptState::NotAttempted;
}
return *clientConn_->zeroRttRejected ? ZeroRttAttemptState::Rejected
: ZeroRttAttemptState::Accepted;
}

// From QuicTransportBase
void onReadData(
const folly::SocketAddress& peer,
Expand Down

0 comments on commit 07a2ee7

Please sign in to comment.