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

Function WriteAMFString

src/brpc/amf.cpp:944–954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

942// [ Write ]
943
944void WriteAMFString(const butil::StringPiece& str, AMFOutputStream* stream) {
945 if (str.size() < 65536u) {
946 stream->put_u8(AMF_MARKER_STRING);
947 stream->put_u16(str.size());
948 stream->putn(str.data(), str.size());
949 } else {
950 stream->put_u8(AMF_MARKER_LONG_STRING);
951 stream->put_u32(str.size());
952 stream->putn(str.data(), str.size());
953 }
954}
955
956void WriteAMFBool(bool val, AMFOutputStream* stream) {
957 stream->put_u8(AMF_MARKER_BOOLEAN);

Callers 15

TESTFunction · 0.85
WriteMethod · 0.85
SendCuePointMethod · 0.85
SendMetaDataMethod · 0.85
OnStopInternalMethod · 0.85
PlayMethod · 0.85
Play2Method · 0.85
PublishMethod · 0.85
SeekMethod · 0.85
PauseMethod · 0.85
SendStopMessageMethod · 0.85
SendConnectRequestMethod · 0.85

Calls 6

put_u8Method · 0.80
put_u16Method · 0.80
putnMethod · 0.80
put_u32Method · 0.80
sizeMethod · 0.45
dataMethod · 0.45

Tested by 1

TESTFunction · 0.68