Add websocket transport
This commit is contained in:
parent
601ba59971
commit
978a669d16
13 changed files with 250 additions and 78 deletions
|
|
@ -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')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue