This commit is contained in:
Roy Hyunjin Han 2015-02-15 11:35:06 -05:00
commit 0c6d4cd4d7

View file

@ -4,12 +4,19 @@ import re
import requests import requests
import six import six
import socket import socket
import sys
import time import time
import websocket import websocket
from .exceptions import SocketIOError, ConnectionError, TimeoutError from .exceptions import SocketIOError, ConnectionError, TimeoutError
if not hasattr(websocket, 'create_connection'):
sys.exit("""Incompatible websocket implementation
- Please make sure that you have websocket-client installed
- Please remove other websocket implementations""")
TRANSPORTS = 'websocket', 'xhr-polling', 'jsonp-polling' TRANSPORTS = 'websocket', 'xhr-polling', 'jsonp-polling'
BOUNDARY = six.u('\ufffd') BOUNDARY = six.u('\ufffd')
TIMEOUT_IN_SECONDS = 3 TIMEOUT_IN_SECONDS = 3