Add websocket transport

This commit is contained in:
Roy Hyunjin Han 2015-04-15 07:17:23 -04:00
commit 978a669d16
13 changed files with 250 additions and 78 deletions

View file

@ -1,18 +1,22 @@
import six
try:
from urllib.parse import urlparse as parse_url
from urllib import urlencode as format_query
except ImportError:
from urllib.parse import urlencode as format_query
try:
from urlparse import urlparse as parse_url
except ImportError:
from urllib.parse import urlparse as parse_url
def get_character(x, index):
return chr(get_byte(x, index))
def get_byte(x, index):
return six.indexbytes(x, index)
def get_character(x, index):
return chr(six.indexbytes(x, index))
def encode_string(x):
return x.encode('utf-8')