| 3413 | // ============== protocol handlers ============= |
| 3414 | |
| 3415 | inline 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 | |
| 3426 | ParseResult ParseRtmpMessage(butil::IOBuf* source, Socket *socket, bool read_eof, |
| 3427 | const void* arg) { |
no test coverage detected