Expand description
FTLogin/F3CLogin channel wire layer.
C++ Futu_OpenD receives already-unwrapped protobuf bodies from F3CLogin.framework. This Rust daemon does not link that framework, so this module implements the equivalent inbound wire layer from FTLogin source.
Hardcoded / assumption ledger:
- Header layout and protocol version are protocol constants from
/Users/leaf/ai-lab/o-src/FTLogin/Src/ftlogin/channel/impl/protocol_header.handprotocol_header.cpp(kProtoVersion = 39). We emit v39, but inbound non-v39 frames are decoded with the legacy byte-11cmd_typeinterpretation used by the pre-v39 Rust decoder. This prevents a broker-side mixed-version response from tearing down the whole channel. - Compressed bodies reserve the first 4 body bytes for BE uncompressed size,
then carry an LZ4 raw block. Ref:
/Users/leaf/ai-lab/o-src/FTLogin/Src/ftlogin/channel/impl/channel_impl.cpp(kBodyFrontReservedBytes = 4,LZ4_decompress_safe). - Decompressed length limit is 12 MiB per the same C++ file
(
kDecompressedDataLengthLimit = 12 * 1024 * 1024).
Structs§
Constants§
Functions§
- compressed_
original_ len - decode_
inbound_ body - decompress_
lz4_ block - LZ4 raw block decompression compatible with C++
LZ4_decompress_safe.