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

Method start_connection

cpp/src/proactor_container_impl.cpp:215–224  ·  view source on GitHub ↗

Takes ownership of pnc NOTE: After the call to start_connection() pnc is active in a proactor thread, and may even have been freed already. It is undefined to use pnc (or any object belonging to it) except in appropriate handlers. SUBTLE NOTE: There must not be any proton::object wrappers in scope when start_connection() is called. The wrapper destructor will call pn_decref() after start_connect

Source from the content-addressed store, hash-verified

213// after start_connection() which is undefined!
214//
215void container::impl::start_connection(const url& url, pn_connection_t *pnc) {
216 pn_transport_t* pnt = pn_transport();
217 connection_context& cc = connection_context::get(pnc);
218 connection_options& co = *cc.connection_options_;
219 co.apply_unbound_client(pnt);
220
221 char caddr[PN_MAX_ADDR];
222 pn_proactor_addr(caddr, sizeof(caddr), url.host().c_str(), url.port().c_str());
223 pn_proactor_connect2(proactor_, pnc, pnt, caddr); // Takes ownership of pnc, pnt
224}
225
226void container::impl::reconnect(pn_connection_t* pnc) {
227 --reconnecting_;

Callers

nothing calls this directly

Calls 8

pn_transportFunction · 0.85
pn_proactor_addrFunction · 0.85
apply_unbound_clientMethod · 0.80
c_strMethod · 0.80
getFunction · 0.70
pn_proactor_connect2Function · 0.50
hostMethod · 0.45
portMethod · 0.45

Tested by

no test coverage detected