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

Function ParseRtmpHostAndPort

src/brpc/rtmp.cpp:2744–2763  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2742}
2743
2744void ParseRtmpHostAndPort(const butil::StringPiece& host_and_port,
2745 butil::StringPiece* host,
2746 butil::StringPiece* port) {
2747 size_t colon_pos = host_and_port.find(':');
2748 if (colon_pos == butil::StringPiece::npos) {
2749 if (host) {
2750 *host = host_and_port;
2751 }
2752 if (port) {
2753 *port = "1935";
2754 }
2755 } else {
2756 if (host) {
2757 *host = host_and_port.substr(0, colon_pos);
2758 }
2759 if (port) {
2760 *port = host_and_port.substr(colon_pos + 1);
2761 }
2762 }
2763}
2764
2765butil::StringPiece RemoveQueryStrings(const butil::StringPiece& stream_name_in,
2766 butil::StringPiece* query_strings) {

Callers 1

ParseRtmpURLFunction · 0.85

Calls 2

substrMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected