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

Function IsPossiblyRtmp

src/brpc/policy/rtmp_protocol.cpp:3415–3424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3413// ============== protocol handlers =============
3414
3415inline ParseResult IsPossiblyRtmp(const butil::IOBuf* source) {
3416 const char* p = (const char*)source->fetch1();
3417 if (p == NULL) {
3418 return MakeParseError(PARSE_ERROR_NOT_ENOUGH_DATA);
3419 }
3420 if (*p != RTMP_DEFAULT_VERSION) {
3421 return MakeParseError(PARSE_ERROR_TRY_OTHERS);
3422 }
3423 return MakeMessage(NULL);
3424}
3425
3426ParseResult ParseRtmpMessage(butil::IOBuf* source, Socket *socket, bool read_eof,
3427 const void* arg) {

Callers 1

ParseRtmpMessageFunction · 0.85

Calls 3

MakeParseErrorFunction · 0.85
MakeMessageFunction · 0.85
fetch1Method · 0.45

Tested by

no test coverage detected