def _processConnectors(self): connector = proton.pn_driver_connector(self._driver) while connector: self.log.debug("Process Connector") # releaes any connector that has been closed if proton.pn_connector_closed(connector): self.log.debug("Closing connector") proton.pn_connector_free(connector) else: proton.pn_connector_process(connector) state = proton.pn_connector_context(connector) if state == AUTHENTICATING: self._authenticateConnector(connector) elif state == CONNECTED: self._serviceConnector(connector) else: self.log.warning("Unknown Connection state '%s'" % state) proton.pn_connector_process(connector) connector = proton.pn_driver_connector(self._driver)
def _processConnectors(self): connector = proton.pn_connector_head(self._driver) while connector: # releaes any connector that has been closed if proton.pn_connector_closed(connector): self.log.debug("Closing connector") proton.pn_connector_free(connector) else: proton.pn_connector_process(connector) state = proton.pn_connector_context(connector) if state == SERVER_AUTH: self._authenticateConnector(connector) elif state == CONNECTED: self._serviceConnector(connector) # Client authentication is handeled in a coroutine elif state == CLIENT_AUTH: pass else: self.log.warning("Unknown Connection state '%s'" % state) proton.pn_connector_process(connector) connector = proton.pn_connector_next(connector)