MCPcopy Create free account
hub / github.com/apache/trafficserver / getHost

Method getHost

src/tscpp/api/Url.cc:130–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130std::string
131Url::getHost() const
132{
133 std::string ret_str;
134 if (isInitialized()) {
135 int length;
136 const char *memptr = TSUrlHostGet(state_->hdr_buf_, state_->url_loc_, &length);
137 if (memptr && length) {
138 ret_str.assign(memptr, length);
139 }
140 LOG_DEBUG("Using host [%s]", ret_str.c_str());
141 }
142 return ret_str;
143}
144
145uint16_t
146Url::getPort() const

Callers 2

setHostMethod · 0.45
mainFunction · 0.45

Calls 3

TSUrlHostGetFunction · 0.85
assignMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected