| 133 | }; |
| 134 | |
| 135 | inline void PackSofaHeader(char* sofa_header, uint32_t meta_size, int body_size) { |
| 136 | uint32_t* dummy = reinterpret_cast<uint32_t*>(sofa_header); // suppress strict-alias warning |
| 137 | *dummy = *reinterpret_cast<const uint32_t*>("SOFA"); |
| 138 | |
| 139 | SofaRawPacker rp(sofa_header + 4); |
| 140 | rp.pack32(meta_size).pack64(body_size).pack64(meta_size + body_size); |
| 141 | } |
| 142 | |
| 143 | static void SerializeSofaHeaderAndMeta( |
| 144 | butil::IOBuf* out, const SofaRpcMeta& meta, int payload_size) { |
no outgoing calls
no test coverage detected