diff options
| author | Devendra | 2014-05-02 01:58:21 +0530 | 
|---|---|---|
| committer | Devendra | 2014-05-02 01:58:21 +0530 | 
| commit | 8a642ab92c537c84960ef3943b34aac95bc39121 (patch) | |
| tree | 08fc753470ad0817f14688d3e4933920e68f10b7 /python/examples/console.py | |
| parent | 06511b3849e80cb5692ed92f7da31043c85556a0 (diff) | |
| download | pubnub-python-8a642ab92c537c84960ef3943b34aac95bc39121.tar.bz2 | |
modifications for susbcribe loop events, connect, disconnect, reconnect
Diffstat (limited to 'python/examples/console.py')
| -rw-r--r-- | python/examples/console.py | 12 | 
1 files changed, 11 insertions, 1 deletions
| diff --git a/python/examples/console.py b/python/examples/console.py index 240e5c0..fd9ebf4 100644 --- a/python/examples/console.py +++ b/python/examples/console.py @@ -127,7 +127,17 @@ def _subscribe_command_handler(channel):      def _error(r):          print_error(r, channel) -    pubnub.subscribe(channel, _callback, _error) + +    def _disconnect(r): +        print_error("DISCONNECTED", channel) + +    def _reconnect(r): +        print_error("RECONNECTED", channel) + +    def _connect(r): +        print_error("CONNECTED", channel) + +    pubnub.subscribe(channel, _callback, _error,connect=_connect, disconnect=_disconnect, reconnect=_reconnect)  def _unsubscribe_command_handler(channel): | 
