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

Function SendFMLEStartResponse

src/brpc/policy/rtmp_protocol.cpp:3124–3142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3122}
3123
3124static bool SendFMLEStartResponse(Socket* sock, double transaction_id) {
3125 butil::IOBuf req_buf;
3126 {
3127 butil::IOBufAsZeroCopyOutputStream zc_stream(&req_buf);
3128 AMFOutputStream ostream(&zc_stream);
3129 WriteAMFString(RTMP_AMF0_COMMAND_RESULT, &ostream);
3130 WriteAMFNumber(transaction_id, &ostream);
3131 WriteAMFNull(&ostream);
3132 WriteAMFUndefined(&ostream);
3133 CHECK(ostream.good());
3134 }
3135 SocketMessagePtr<RtmpUnsentMessage> msg(
3136 MakeUnsentControlMessage(RTMP_MESSAGE_COMMAND_AMF0, req_buf));
3137 if (sock->Write(msg) != 0) {
3138 PLOG(WARNING) << sock->remote_side() << ": Fail to respond FMLEStart";
3139 return false;
3140 }
3141 return true;
3142}
3143
3144bool RtmpChunkStream::OnReleaseStream(
3145 const RtmpMessageHeader& mh, AMFInputStream* istream, Socket* socket) {

Callers 3

OnReleaseStreamMethod · 0.85
OnFCPublishMethod · 0.85
OnFCUnpublishMethod · 0.85

Calls 8

WriteAMFStringFunction · 0.85
WriteAMFNumberFunction · 0.85
WriteAMFNullFunction · 0.85
WriteAMFUndefinedFunction · 0.85
MakeUnsentControlMessageFunction · 0.85
goodMethod · 0.45
WriteMethod · 0.45
remote_sideMethod · 0.45

Tested by

no test coverage detected