Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
A connection listener for recording statistics on messages sent and received.

src/s/t/stomp.py-4.0.11/stomp/__main__.py   stomp.py(Download)
 
from connect import StompConnection10,StompConnection11,StompConnection12
from listener import ConnectionListener, StatsListener
from exception import NotConnectedException
from backward import input_prompt
                self.__error('No stats available')
        elif args[0] == 'on':
            self.conn.set_listener('stats', StatsListener())
        elif args[0] == 'off':
            self.conn.remove_listener('stats')

src/s/t/stomp.py-HEAD/stomp/__main__.py   stomp.py(Download)
 
from connect import StompConnection10,StompConnection11,StompConnection12
from listener import ConnectionListener, StatsListener
from adapter.multicast import MulticastConnection
import colors
                self.__error('No stats available')
        elif args[0] == 'on':
            self.conn.set_listener('stats', StatsListener())
        elif args[0] == 'off':
            self.conn.remove_listener('stats')