mirror of
https://github.com/facebook/proxygen.git
synced 2026-10-24 01:33:54 +03:00
remove HQDownstreamSession::createEgressPushStream
Summary: removes `HQDownstreamSession::createEgressPushStream`, continued efforts to remove all things http push related in proxygen/lib Reviewed By: jbeshay, Carl-Elkhoury Differential Revision: D124399212 fbshipit-source-id: bf3b8d4efd3cd91b28328884e029f369086587cd
This commit is contained in:
committed by
meta-codesync[bot]
parent
883d02e214
commit
afe4041c30
@@ -85,60 +85,6 @@ bool HQDownstreamSession::pushAllowedByGoaway(hq::PushId pushId) {
|
||||
return pushId < peerMinUnseenId_;
|
||||
}
|
||||
|
||||
HQDownstreamSession::HQEgressPushStream* FOLLY_NULLABLE
|
||||
HQDownstreamSession::createEgressPushStream(hq::PushId pushId,
|
||||
quic::StreamId streamId,
|
||||
quic::StreamId parentStreamId) {
|
||||
|
||||
VLOG(4) << __func__ << "sess=" << *this << " pushId=" << pushId
|
||||
<< " isClosing()=" << isClosing() << " streamId=" << streamId
|
||||
<< " parentStreamId=" << parentStreamId;
|
||||
|
||||
// Use version utils to ensure that the session is not in draining state
|
||||
if (!pushAllowedByGoaway(pushId)) {
|
||||
VLOG(3) << __func__ << " Not creating - session is draining"
|
||||
<< " sess=" << *this << " pushId=" << pushId
|
||||
<< " isClosing()=" << isClosing() << " streamId=" << streamId
|
||||
<< " parentStreamId=" << parentStreamId;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto codec = createCodec(streamId);
|
||||
|
||||
auto matchPair = egressPushStreams_.emplace(
|
||||
std::piecewise_construct,
|
||||
std::forward_as_tuple(streamId),
|
||||
std::forward_as_tuple(
|
||||
*this,
|
||||
streamId,
|
||||
pushId,
|
||||
parentStreamId,
|
||||
getNumTxnServed(),
|
||||
std::move(codec),
|
||||
WheelTimerInstance(transactionsTimeout_, getEventBase())));
|
||||
incrementSeqNo();
|
||||
|
||||
pushIdToStreamId_[pushId] = streamId;
|
||||
streamIdToPushId_[streamId] = pushId;
|
||||
|
||||
CHECK(matchPair.second) << "Emplacement failed, despite earlier "
|
||||
"existence check.";
|
||||
|
||||
// Generate the stream preface
|
||||
matchPair.first->second.generateStreamPreface();
|
||||
|
||||
// Generate the push id
|
||||
matchPair.first->second.generateStreamPushId();
|
||||
|
||||
// Notify pending egress on the stream
|
||||
matchPair.first->second.notifyPendingEgress();
|
||||
|
||||
// tracks max historical streams
|
||||
HTTPSessionBase::onNewOutgoingStream(getNumOutgoingStreams());
|
||||
|
||||
return &matchPair.first->second;
|
||||
}
|
||||
|
||||
uint32_t HQDownstreamSession::numberOfEgressPushStreams() const {
|
||||
return egressPushStreams_.size();
|
||||
}
|
||||
|
||||
@@ -168,11 +168,6 @@ class HQDownstreamSession : public HQSession {
|
||||
|
||||
uint32_t numberOfEgressPushStreams() const;
|
||||
|
||||
HQEgressPushStream* FOLLY_NULLABLE
|
||||
createEgressPushStream(hq::PushId pushId,
|
||||
quic::StreamId streamId,
|
||||
quic::StreamId parentStreamId);
|
||||
|
||||
void dispatchPushStream(quic::StreamId /* pushStreamId */,
|
||||
hq::PushId /* pushId */,
|
||||
size_t /* toConsume */) override {
|
||||
|
||||
Reference in New Issue
Block a user