Пример #1
0
 def _cleanSessions(self, conn):
     ssn = proton.pn_session_head(conn, (proton.PN_LOCAL_ACTIVE |
                                         proton.PN_REMOTE_CLOSED))
     while ssn:
         self.log.debug("Closing Session")
         proton.pn_session_close(ssn)
         ssn = proton.pn_session_next(ssn, (proton.PN_LOCAL_ACTIVE |
                                            proton.PN_REMOTE_CLOSED))
Пример #2
0
 def _cleanSessions(self, conn):
     ssn = proton.pn_session_head(
         conn, (proton.PN_LOCAL_ACTIVE | proton.PN_REMOTE_CLOSED))
     while ssn:
         self.log.debug("Closing Session")
         proton.pn_session_close(ssn)
         ssn = proton.pn_session_next(
             ssn, (proton.PN_LOCAL_ACTIVE | proton.PN_REMOTE_CLOSED))
Пример #3
0
    def _openPendingSessions(self, conn, connector):
        ssn = proton.pn_session_head(conn, proton.PN_LOCAL_UNINIT)
        while ssn:
            proton.pn_session_open(ssn)
            ctx = ProtonClient(self, conn, connector, ssn, None)
            l = proton.pn_connector_listener(connector)
            listener = proton.pn_listener_context(l)
            listener._acceptHandler(listener, ctx)

            proton.pn_session_set_context(ssn, ctx)
            self.log.debug("Session Opened.")
            ssn = proton.pn_session_next(ssn, proton.PN_LOCAL_UNINIT)
Пример #4
0
    def _openPendingSessions(self, conn, connector):
        ssn = proton.pn_session_head(conn, proton.PN_LOCAL_UNINIT)
        while ssn:
            proton.pn_session_open(ssn)
            ctx = ProtonClient(self, conn, connector, ssn, None)
            l = proton.pn_connector_listener(connector)
            listener = proton.pn_listener_context(l)
            listener._acceptHandler(listener, ctx)

            proton.pn_session_set_context(ssn, ctx)
            self.log.debug("Session Opened.")
            ssn = proton.pn_session_next(ssn, proton.PN_LOCAL_UNINIT)
Пример #5
0
 def _iterSessions(self, conn, flags):
     ssn = proton.pn_session_head(conn, flags)
     while ssn:
         yield ssn
         ssn = proton.pn_session_next(ssn, flags)
Пример #6
0
 def _iterSessions(self, conn, flags):
     ssn = proton.pn_session_head(conn, flags)
     while ssn:
         yield ssn
         ssn = proton.pn_session_next(ssn, flags)