aboutsummaryrefslogtreecommitdiffstats
path: root/PubnubCoreAsync.py
diff options
context:
space:
mode:
authorDevendra2013-02-25 15:19:20 +0530
committerDevendra2013-02-25 15:19:20 +0530
commit2ea3826d516fdf10a889e98ffab04a8f1d790650 (patch)
treec3ce186125e287a85d30f28f9f20f16a632da59a /PubnubCoreAsync.py
parent8b1a2eb372f2206f24029cc7e4694ae472599d95 (diff)
downloadpubnub-python-2ea3826d516fdf10a889e98ffab04a8f1d790650.tar.bz2
saving python async consolidation work
Diffstat (limited to 'PubnubCoreAsync.py')
-rw-r--r--PubnubCoreAsync.py22
1 files changed, 4 insertions, 18 deletions
diff --git a/PubnubCoreAsync.py b/PubnubCoreAsync.py
index 4eb62e9..b31fdfe 100644
--- a/PubnubCoreAsync.py
+++ b/PubnubCoreAsync.py
@@ -21,19 +21,7 @@ except ImportError:
import Crypto.Hash.SHA256 as digestmod
sha256 = digestmod.new
import hmac
-from twisted.internet import reactor
-from twisted.internet.defer import Deferred
-from twisted.internet.protocol import Protocol
-from twisted.web.client import Agent
-from twisted.web.client import HTTPConnectionPool
-from twisted.web.http_headers import Headers
from PubnubCrypto import PubnubCrypto
-import gzip
-import zlib
-
-pnconn_pool = HTTPConnectionPool(reactor)
-pnconn_pool.maxPersistentPerHost = 100
-pnconn_pool.cachedConnectionTimeout = 310
class PubnubCoreAsync(object):
@@ -78,12 +66,9 @@ class PubnubCoreAsync(object):
self.subscriptions = {}
self.timetoken = 0
self.uuid = uuid or str(self.uuid())
- self.headers = {
- 'V' : '3.1',
- 'User-Agent' : 'Python-*',
- 'Accept-Encoding' : 'gzip'
- }
-
+ self.version = '3.4'
+ self.accept_encoding = 'gzip'
+ print self.ssl
if self.ssl :
self.origin = 'https://' + self.origin
else :
@@ -277,6 +262,7 @@ class PubnubCoreAsync(object):
pc = PubnubCrypto()
out = []
for message in response[0]:
+ print type(message)
if self.cipher_key :
if type( message ) == type(list()):
for item in message: