MCPcopy Create free account
hub / github.com/apache/qpid-proton / port_int

Method port_int

cpp/src/url.cpp:256–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254const std::string url::AMQPS("amqps");
255
256uint16_t url::port_int() const {
257 if (port() == AMQP) return 5672;
258 if (port() == AMQPS) return 5671;
259 std::istringstream is(port());
260 uint16_t result;
261 is >> result;
262 if (is.fail())
263 throw url_error("invalid port '" + port() + "'");
264 return result;
265}
266
267std::ostream& operator<<(std::ostream& o, const url& u) {
268 return o << std::string(u);

Callers 1

url_test.cppFile · 0.80

Calls 1

failMethod · 0.45

Tested by

no test coverage detected