mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-11-09 10:00:57 +03:00
Only take a QuicServerConnectionState when constructing ServerHandshake (#90)
Summary: The cryptoState can be derrived from it, so it is redundant to pass it. This PR depends on https://github.com/facebookincubator/mvfst/issues/88 Pull Request resolved: https://github.com/facebookincubator/mvfst/pull/90 Reviewed By: mjoras Differential Revision: D19622581 Pulled By: yangchi fbshipit-source-id: b3c88999199673f69c4422b96fbe7f2b0656bf6c
This commit is contained in:
committed by
Facebook Github Bot
parent
d345eff6af
commit
2f8774c921
@@ -15,12 +15,10 @@
|
||||
#include <fizz/protocol/Protocol.h>
|
||||
|
||||
namespace quic {
|
||||
ServerHandshake::ServerHandshake(
|
||||
QuicConnectionStateBase* conn,
|
||||
QuicCryptoState& cryptoState)
|
||||
ServerHandshake::ServerHandshake(QuicConnectionStateBase* conn)
|
||||
: conn_(conn),
|
||||
actionGuard_(nullptr),
|
||||
cryptoState_(cryptoState),
|
||||
cryptoState_(*conn->cryptoState),
|
||||
visitor_(*this) {}
|
||||
|
||||
void ServerHandshake::accept(
|
||||
|
||||
@@ -71,9 +71,7 @@ class ServerHandshake : public Handshake {
|
||||
*/
|
||||
enum class Phase { Handshake, KeysDerived, Established };
|
||||
|
||||
explicit ServerHandshake(
|
||||
QuicConnectionStateBase* conn,
|
||||
QuicCryptoState& cryptoState);
|
||||
explicit ServerHandshake(QuicConnectionStateBase* conn);
|
||||
|
||||
/**
|
||||
* Starts accepting the TLS connection.
|
||||
|
||||
@@ -133,7 +133,7 @@ struct QuicServerConnectionState : public QuicConnectionStateBase {
|
||||
QuicVersion::QUIC_DRAFT,
|
||||
QuicVersion::QUIC_DRAFT_23}};
|
||||
originalVersion = QuicVersion::MVFST;
|
||||
serverHandshakeLayer = new ServerHandshake(this, *cryptoState);
|
||||
serverHandshakeLayer = new ServerHandshake(this);
|
||||
handshakeLayer.reset(serverHandshakeLayer);
|
||||
// We shouldn't normally need to set this until we're starting the
|
||||
// transport, however writing unit tests is much easier if we set this here.
|
||||
|
||||
@@ -44,7 +44,7 @@ class FakeServerHandshake : public ServerHandshake {
|
||||
bool chloSync = false,
|
||||
bool cfinSync = false,
|
||||
folly::Optional<uint64_t> clientActiveConnectionIdLimit = folly::none)
|
||||
: ServerHandshake(&conn, *conn.cryptoState),
|
||||
: ServerHandshake(&conn),
|
||||
conn_(conn),
|
||||
chloSync_(chloSync),
|
||||
cfinSync_(cfinSync),
|
||||
|
||||
Reference in New Issue
Block a user