Expand description
CMD 20176 kCmdFetchValidBrokerList —— 获取 cid 当前有效的券商列表。
对齐 C++ FTLogin/Src/ftlogin/channel/impl/logger.cpp:1425-1500 的
FetchValidBrokerList。从 2024 起 C++ 用这个命令取代了老的 9419
kCmdFetchMainBroker,作为 broker 通道有效性判定的权威源。
§我们的用法(v1.4.22)
Platform TCP login 成功后发一次 CMD 20176,返回的 broker_ids 用于
sanity check:和 HTTP auth 拿到的 auth_code_list 里的 broker_id
集合对比。
- 一致 → 用 auth_code_list 正常建通道
- 不一致 → 打 WARN,仍以 auth_code_list 为准(服务端对同账号有时 返回子集,保守策略:auth_code_list 更全,用它保底)
- CMD 20176 失败(网络 / 服务端不支持)→ 不阻塞,跳过 sanity check
未来如果 auth_code_list 开始滞后于 CMD 20176(C++ 已经这样)可以切到 20176 为权威源。MVP 保守。
Constants§
Functions§
- diff_
broker_ sources - 把 CMD 20176 返回的 broker_ids 和 HTTP auth 返回的 auth_code_list 做一致性 diff,不一致时打 WARN,返回建议使用的权威 broker_id 集 (MVP 以 auth_code_list 为准,未来可切 20176)。
- fetch_
valid_ broker_ list - 向 Platform 通道发 CMD 20176,返回服务端认为该 cid 当前有效的 broker_id
列表。失败返回
Err(调用方通常 log + ignore)。