| 2414 | |
| 2415 | |
| 2416 | static pn_event_t *pconnection_batch_next(pn_event_batch_t *batch) { |
| 2417 | pconnection_t *pc = batch_pconnection(batch); |
| 2418 | pn_event_t *e = pn_connection_driver_next_event(&pc->driver); |
| 2419 | if (!e && ++pc->hog_count < HOG_MAX) { |
| 2420 | pconnection_process(pc, NULL, true); // top up |
| 2421 | e = pn_connection_driver_next_event(&pc->driver); |
| 2422 | } |
| 2423 | if (e && !pc->started && pn_event_type(e) == PN_CONNECTION_BOUND) |
| 2424 | pc->started = true; // SSL will be set up on return and safe to do IO with correct transport layers |
| 2425 | return e; |
| 2426 | } |
| 2427 | |
| 2428 | static void pconnection_done(pconnection_t *pc) { |
| 2429 | { |
nothing calls this directly
no test coverage detected