单男是什么意思| N1是什么| 低蛋白血症是什么病| 狗吐了是什么原因| 唐氏综合症是什么原因| 人为什么会打嗝| 什么是回避型依恋人格| 下嘴唇有痣代表什么| 什么| 属实是什么意思| 口腔溃疡可以吃什么药| 36朵玫瑰花代表什么意思| 兰花什么时候开花| 香茅是什么东西| 为什么加油站不能打电话| 4月26日是什么星座| exp是什么| 女性喝什么茶比较好| siri是什么意思| 表面积是什么| 直肠指检能检查出什么| ky什么意思| 空调出现pl是什么意思| 娘家人是什么意思| 甲硝唑治什么| 三七粉主治什么| 精子是什么颜色的| 手掌麻是什么原因引起的| edp是什么意思| 什么是静电| 以示是什么意思| 辣木籽有什么功效| 遇上方知有什么意思| 脉搏跳得快是什么原因| 核磁共振是检查什么的| 额头发黑是什么原因| 胎儿双侧肾盂无分离是什么意思| 约会去什么地方比较好| 鸡拉绿色粪便是什么病| 星字属于五行属什么| 蜜蜡和琥珀有什么区别| 胰岛素是干什么用的| 打鼾是什么原因引起的| 骏五行属什么| 什么人骗别人也骗自己| 250什么意思| 静脉血栓有什么症状| 什么是速率| 肾造瘘是什么意思| 痔疮发痒是什么原因| 血糖高喝什么饮料好| 高枕无忧是什么意思| 梦到自己老公出轨是什么意思| 为什么会肛裂| 宁字五行属什么| 日和立念什么| 黄金属于五行属什么| 什么是菜花状疣图片| 3月是什么星座的| 过敏忌口不能吃什么| 什么是毛周角化| 排骨汤里放什么食材好| 高血压是什么引起的| 后背中心疼是什么原因| 耳鸣是什么原因| 心脏缺血吃什么补得快| 眼睛流眼泪用什么眼药水| 长智齿是什么原因引起的| 神经质是什么意思| 心跳太慢吃什么药| 化疗有什么副作用| 11月2日是什么星座| 什么币最值钱| 中国梦是什么梦| 轻医美是什么| 大便一粒一粒的是什么原因| 肾功能不全吃什么药| chanel什么牌子| 09年是什么年| 李嘉诚属什么生肖| 秋天可以干什么| 尿液弱阳性什么意思| 检查hpv需要注意什么提前注意什么| 右胳膊麻木是什么征兆| 月经流的是什么血| 帅t是什么意思| 鸡眼用什么药好| 体寒是什么意思| 自闭症是什么人投胎| 粉黛是什么意思| 什么是省控线| 镜架什么材质好| acs是什么意思| 闭关修炼是什么意思| 慢性浅表性胃炎吃什么药好得快| 妇科千金片和三金片有什么区别| 耳朵响是什么原因引起的| 妊娠纹长什么样| 头上长痣代表什么| 三个直念什么| 黑色签字笔是什么笔| 痰有腥臭味是什么原因| 乌玛王是什么牌子| 王不见王是什么意思| 蝉代表什么生肖| 肝火郁结是什么症状| 断掌是什么意思| 起付线是什么意思| 尿常规查什么| waist是什么意思| 20度穿什么| 豚的右边念什么| 吃什么养肝护肝| 日本人为什么喜欢喝冰水| 激动是什么意思| 什么粥减肥效果好| 青蟹什么季节吃最好| hiv是什么| 男生一般什么时候停止长高| 高处不胜寒的胜是什么意思| 过敏性紫癜是什么病| 肌酐是什么意思| 孕妇梦见棺材是什么征兆| 什么的饰品| 暂告一段落是什么意思| 指甲上有白点是什么原因| 红海为什么叫红海| kys什么意思| 驿站是什么意思| 甲功不正常有什么表现| 热结旁流是什么意思| 吃什么水果可以通便| 嗯是什么意思| 扫兴是什么意思| 拜阿司匹林和阿司匹林有什么区别| 为什么吃一点东西肚子就胀| 口羊读什么| 痛风吃什么中药最有效| 肝郁血虚吃什么中成药| 产检挂什么科| 分野是什么意思| 小孩子眼睛眨得很频繁是什么原因| 什么是树脂材料| 阴囊潮湿用什么药| 经常打屁是什么原因| 格色是什么意思| 晕车贴什么时候贴| 喝什么醒酒| 沉香手串有什么好处| 申时是什么时候| 胃粘膜糜烂吃什么药| 女性漏尿是什么原因| 盆腔炎吃什么药最好| 先天性心脏病最怕什么| 午睡睡不着是什么原因| 总胆红素偏高是什么意思| 什么动物不睡觉| 例假提前是什么原因| 鸡生肖配什么生肖最好| 谭咏麟属什么生肖| 动人是什么意思| babyface是什么意思| 51是什么意思| 手心脚心发热是什么原因| 第二性征是什么意思| 胸部里面有个圆圆的硬东西是什么| 什么的季节| 硫酸镁注射有什么作用| 接骨木莓是什么| 秋葵有什么好处| 过敏性紫癜是什么原因引起的| 手指甲发白是什么原因| 玙字五行属什么| 什么花在春天开| 烧仙草是什么做的| 痛经吃什么药最有效| 举足轻重是什么意思| 金棕色是什么颜色| 中耳炎吃什么药最有效| 血凝是什么意思| 形态各异的异是什么意思| 颠了是什么意思| au9999是什么意思| 过敏性紫癜挂什么科| 什么药降肌酐| 看客是什么意思| 想留不能留才最寂寞是什么歌| 八哥是什么鸟| 屋尘螨和粉尘螨是什么| 什么食物属于发物| 吃什么可以美白| hyper是什么意思| 急性肠胃炎可以吃什么| 鳌鱼是什么鱼| 面部痉挛是什么原因引起的| 阿米巴是什么意思| 368什么意思| 下面有炎症用什么药| 卤素灯是什么灯| 天罗地网是什么意思| 人为什么会得肿瘤| 全身皮肤瘙痒是什么原因| 每天早上起床口苦是什么原因| 糜烂性胃炎吃什么药好| 乳腺纤维瘤有什么症状表现| 8.26是什么星座| 菊花有什么功效和作用| 痛经 吃什么| 擦什么能阻止毛发生长| 炼乳是什么做的| 湿疹有什么症状和图| 吃什么补孕酮最快| 秦国是现在的什么地方| 单核细胞高是什么感染| 眼底出血用什么眼药水| 什么姿势最爽| 巴基斯坦是什么人种| 洗衣粉和洗衣液有什么区别| 阿尔茨海默症是什么| 黄油是什么| 昭字五行属什么| 吃什么治便秘最有效| 什么是偏旁什么是部首| 伪娘什么意思| 今天的日子适合做什么| 数九寒天是什么意思| 恒顺众生是什么意思| 运动后出汗多是什么原因| 牙龈发炎吃什么药| 为什么女的会流水怎么回事| 冰点是什么意思| 吃避孕药会有什么副作用| 梦见自己结婚了是什么征兆| 下火吃什么药| 尿血是什么问题| 当志愿者有什么好处| 小便带血是什么原因男性| 腿肿脚肿是什么原因引起的| 尖嘴是什么生肖| 常吃猪油有什么好处和坏处| 睡觉为什么磨牙| 为什么一动就出汗| 大兴什么| 胆囊壁欠光滑是什么意思| 因果报应是什么意思| 六月初九是什么星座| 食指上有痣代表什么| 脸上长小疙瘩是什么原因| 色盲是什么意思| 碳酸氢钠是什么添加剂| 新生儿头发稀少是什么原因| 一个人是什么歌| 汉族是什么人种| 松字五行属什么| 新生儿不睡觉是什么原因| 孙尚香字什么| 吃葡萄有什么好处| 真菌孢子是什么| 在岸人民币和离岸人民币什么意思| 鼻子经常流鼻涕是什么原因| 脸上不停的长痘痘是什么原因| 下肢水肿吃什么药| 子宫内膜厚有什么症状| 这个季节吃什么水果最好| 百度
blob: de9867ffa6823e805660e375e480daaeefe4c740 [file] [log] [blame]
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_HTTP_HTTP_STREAM_POOL_JOB_H_
#define NET_HTTP_HTTP_STREAM_POOL_JOB_H_
#include <memory>
#include <vector>
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "net/base/net_error_details.h"
#include "net/base/net_export.h"
#include "net/dns/public/resolve_error_info.h"
#include "net/http/http_stream_pool.h"
#include "net/socket/connection_attempts.h"
#include "net/socket/next_proto.h"
#include "net/socket/stream_socket.h"
#include "net/ssl/ssl_info.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_versions.h"
namespace net {
class HttpStream;
class SSLCertRequestInfo;
class NetLogWithSource;
struct NetErrorDetails;
// Used by a `Delegate` to handle a stream request or a preconnect for a
// destination. The destination could be the origin or alternative services.
class HttpStreamPool::Job {
public:
// Interface to report Job's results. JobController is the only implementation
// of this interface other than tests. We abstract the interface to avoid a
// circular dependency.
class NET_EXPORT_PRIVATE Delegate {
public:
virtual ~Delegate() = default;
// Returns the priority of the job.
virtual RequestPriority priority() const = 0;
// Returns whether the limits should be respected.
virtual RespectLimits respect_limits() const = 0;
// Returns allowed bad certificates.
virtual const std::vector<SSLConfig::CertAndStatus>& allowed_bad_certs()
const = 0;
// True when IP-based pooling is enabled.
virtual bool enable_ip_based_pooling_for_h2() const = 0;
// True when alternative services is enabled.
virtual bool enable_alternative_services() const = 0;
// Returns the set of ALPNs that are allowed for this job.
virtual NextProtoSet allowed_alpns() const = 0;
// Returns the proxy info.
virtual const ProxyInfo& proxy_info() const = 0;
virtual const NetLogWithSource& net_log() const = 0;
// Callback methods: Only one of these methods will be called.
// Called when a stream is ready.
virtual void OnStreamReady(Job* job,
std::unique_ptr<HttpStream> stream,
NextProto negotiated_protocol) = 0;
// Called when stream attempts failed.
virtual void OnStreamFailed(Job* job,
int status,
const NetErrorDetails& net_error_details,
ResolveErrorInfo resolve_error_info) = 0;
// Called when a stream attempt has failed due to a certificate error.
virtual void OnCertificateError(Job* job,
int status,
const SSLInfo& ssl_info) = 0;
// Called when a stream attempt has requested a client certificate.
virtual void OnNeedsClientAuth(Job* job, SSLCertRequestInfo* cert_info) = 0;
// Called when the preconnect has completed.
virtual void OnPreconnectComplete(Job* job, int status) = 0;
};
// `delegate` must outlive `this`. For a stream request, `num_streams` must
// not be specified. For a preconnect, `num_streams` must be specified.
Job(Delegate* delegate,
JobType type,
Group* group,
quic::ParsedQuicVersion quic_version,
NextProto expected_protocol,
const NetLogWithSource& request_net_log,
size_t num_streams = 0);
Job& operator=(const Job&) = delete;
~Job();
// Starts this job.
void Start();
// Returns the LoadState of this job.
LoadState GetLoadState() const;
// Called when the priority of this job changes.
void SetPriority(RequestPriority priority);
// Add connection attempts to the job.
void AddConnectionAttempts(const ConnectionAttempts& attempts);
// Called by the associated AttemptManager when a stream is ready.
void OnStreamReady(std::unique_ptr<HttpStream> stream,
NextProto negotiated_protocol);
// Called by the associated AttemptManager when stream attempts failed.
void OnStreamFailed(int rv,
const NetErrorDetails& net_error_details,
ResolveErrorInfo resolve_error_info);
// Called by the associated AttemptManager when an stream attempt has failed
// due to a certificate error.
void OnCertificateError(int status, const SSLInfo& ssl_info);
// Called by the associated AttemptManager when an stream attempt has
// requested a client certificate.
void OnNeedsClientAuth(SSLCertRequestInfo* cert_info);
// Called by the associated AttemptManager when the preconnect completed.
void OnPreconnectComplete(int status);
// Helper method to call OnPreconnectComplete asynchronously. Used to avoid
// a dangling pointer since calling `delegate_->OnPreconnectComplete()`
// deletes `this` synchronously.
void CallOnPreconnectCompleteLater(int status);
RequestPriority priority() const { return delegate_->priority(); }
RespectLimits respect_limits() const { return delegate_->respect_limits(); }
bool enable_ip_based_pooling_for_h2() const {
return delegate_->enable_ip_based_pooling_for_h2();
}
bool enable_alternative_services() const {
return delegate_->enable_alternative_services();
}
const ProxyInfo& proxy_info() const { return delegate_->proxy_info(); }
const std::vector<SSLConfig::CertAndStatus>& allowed_bad_certs() const {
return delegate_->allowed_bad_certs();
}
const NetLogWithSource& delegate_net_log() const {
return delegate_->net_log();
}
const NetLogWithSource& net_log() const { return job_net_log_; }
const NetLogWithSource& request_net_log() const { return request_net_log_; }
quic::ParsedQuicVersion quic_version() const { return quic_version_; }
const NextProtoSet& allowed_alpns() const { return allowed_alpns_; }
size_t num_streams() const { return num_streams_; }
JobType type() const { return type_; }
const ConnectionAttempts& connection_attempts() const {
return connection_attempts_;
}
base::TimeTicks create_time() const { return create_time_; }
private:
const raw_ptr<Delegate> delegate_;
const JobType type_;
raw_ptr<AttemptManager> attempt_manager_;
const quic::ParsedQuicVersion quic_version_;
const NextProtoSet allowed_alpns_;
const NetLogWithSource request_net_log_;
const NetLogWithSource job_net_log_;
const size_t num_streams_;
const base::TimeTicks create_time_;
std::optional<int> result_;
std::optional<NextProto> negotiated_protocol_;
ConnectionAttempts connection_attempts_;
base::WeakPtrFactory<Job> weak_ptr_factory_{this};
};
} // namespace net
#endif // NET_HTTP_HTTP_STREAM_POOL_JOB_H_
尿液浑浊是什么原因 eu是什么元素 肚脐眼下方是什么器官 电销是什么 酵母样真菌是什么意思
母亲节说什么 1927年中国发生了什么 谷维素片治什么病 交警大队长是什么级别 蒙昧是什么意思
工装裤配什么鞋 薄荷泡水喝有什么功效 肛门出血什么原因 抖阴是什么 红领巾的含义是什么
什么地方 肝胆胰腺属于什么科 膝关节痛挂什么科 众矢之的是什么意思 四曾念什么
吃饭出汗是什么原因dajiketang.com 戒手淫有什么好处hcv9jop5ns8r.cn 起酥油是什么hcv8jop3ns3r.cn 强直性脊柱炎看什么科bysq.com 慢性肠炎用什么药hcv8jop3ns6r.cn
碧字五行属什么hcv8jop8ns2r.cn 甲钴胺治疗什么病hcv7jop7ns1r.cn 什么东西蛋白质含量高jasonfriends.com tap什么意思hcv8jop0ns6r.cn 脸两侧长痘痘是什么原因hcv8jop8ns0r.cn
阴囊瘙痒用什么药膏hcv9jop4ns4r.cn 六月初八是什么日子hcv7jop9ns5r.cn 牙齿一吸就出血是什么原因kuyehao.com 感冒不能吃什么onlinewuye.com 为什么会得多囊wzqsfys.com
弈字五行属什么gysmod.com 灰指甲用什么药膏hcv8jop2ns1r.cn 什么的蚜虫ff14chat.com 精神恍惚是什么症状bjcbxg.com serum是什么意思hcv8jop0ns5r.cn
百度