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

Function run

c/tests/ssl_proactor_test.cpp:141–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139
140typedef bool handler_t(app_data_t* app, pn_event_t* event);
141void run(pn_proactor_t *p, app_data_t *app, handler_t *shandler, handler_t *chandler) {
142 /* Loop and handle server/client events */
143 do {
144 pn_event_batch_t *events = pn_proactor_wait(p);
145 pn_event_t *e;
146 for (e = pn_event_batch_next(events); e; e = pn_event_batch_next(events)) {
147 if (pn_event_type(e)==PN_PROACTOR_INACTIVE) {
148 return;
149 }
150
151 if (pn_event_listener(e)) {
152 if (!shandler(app, e)) {
153 return;
154 }
155 } else {
156 if (!chandler(app, e)) {
157 return;
158 }
159 }
160 }
161 pn_proactor_done(p, events);
162 } while(true);
163}
164
165static void run_until_listener_open(pn_proactor_t* p) {
166 do {

Callers 1

Calls 5

pn_event_batch_nextFunction · 0.85
pn_event_typeFunction · 0.85
pn_proactor_waitFunction · 0.50
pn_event_listenerFunction · 0.50
pn_proactor_doneFunction · 0.50

Tested by

no test coverage detected