MCPcopy Create free account
hub / github.com/apache/brpc / WriteAMFArray

Function WriteAMFArray

src/brpc/amf.cpp:1134–1144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1132}
1133
1134void WriteAMFArray(const AMFArray& arr, AMFOutputStream* stream) {
1135 stream->put_u8(AMF_MARKER_STRICT_ARRAY);
1136 stream->put_u32(arr.size());
1137 for (size_t i = 0; i < arr.size(); ++i) {
1138 WriteAMFField(arr[i], stream);
1139 if (!stream->good()) {
1140 LOG(ERROR) << "Fail to serialize item[" << i << ']';
1141 return;
1142 }
1143 }
1144}
1145
1146std::ostream& operator<<(std::ostream& os, const AMFField& field) {
1147 switch (field.type()) {

Callers 1

WriteAMFFieldFunction · 0.85

Calls 5

WriteAMFFieldFunction · 0.85
put_u8Method · 0.80
put_u32Method · 0.80
sizeMethod · 0.45
goodMethod · 0.45

Tested by

no test coverage detected