Fix HyBi support on 64-bit systems.
https://github.com/kanaka/noVNC/issues/76 - cleanup/update TODO. - remove explicit check for ctypes module for HyBi.
This commit is contained in:
parent
2e00f96431
commit
86af0b614d
14
docs/TODO
14
docs/TODO
|
@ -1,17 +1,9 @@
|
||||||
- Support protocol version 07:
|
- Go implementation
|
||||||
http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07
|
|
||||||
|
|
||||||
- Support multiple targets that are selected by the path line. Some
|
- Support multiple targets that are selected by the path line. Some
|
||||||
sort of wildcarding of ports too.
|
sort of wildcarding of ports too.
|
||||||
|
|
||||||
|
- Support SSL targets too.
|
||||||
|
|
||||||
- wstelnet: support CSI L and CSI M
|
- wstelnet: support CSI L and CSI M
|
||||||
|
|
||||||
- create gevent version:
|
|
||||||
http://nichol.as/benchmark-of-python-web-servers
|
|
||||||
http://n01se.net/paste/QXO
|
|
||||||
|
|
||||||
- Need at least libevent-1.4 (i.e. not 9.04 Jaunty)
|
|
||||||
|
|
||||||
sudo aptitude install python-dev libevent-dev python-setuptools
|
|
||||||
|
|
||||||
sudo easy_install gevent
|
|
||||||
|
|
|
@ -49,8 +49,7 @@ else:
|
||||||
|
|
||||||
# Degraded functionality if these imports are missing
|
# Degraded functionality if these imports are missing
|
||||||
for mod, sup in [('numpy', 'HyBi protocol'),
|
for mod, sup in [('numpy', 'HyBi protocol'),
|
||||||
('ctypes', 'HyBi protocol'), ('ssl', 'TLS/SSL/wss'),
|
('ssl', 'TLS/SSL/wss'), ('resource', 'daemonizing')]:
|
||||||
('resource', 'daemonizing')]:
|
|
||||||
try:
|
try:
|
||||||
globals()[mod] = __import__(mod)
|
globals()[mod] = __import__(mod)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -298,9 +297,9 @@ Sec-WebSocket-Accept: %s\r
|
||||||
f['mask'] = buf[f['hlen']:f['hlen']+4]
|
f['mask'] = buf[f['hlen']:f['hlen']+4]
|
||||||
b = c = ''
|
b = c = ''
|
||||||
if f['length'] >= 4:
|
if f['length'] >= 4:
|
||||||
mask = numpy.frombuffer(buf, dtype=numpy.dtype('<L4'),
|
mask = numpy.frombuffer(buf, dtype=numpy.dtype('<u4'),
|
||||||
offset=f['hlen'], count=1)
|
offset=f['hlen'], count=1)
|
||||||
data = numpy.frombuffer(buf, dtype=numpy.dtype('<L4'),
|
data = numpy.frombuffer(buf, dtype=numpy.dtype('<u4'),
|
||||||
offset=f['hlen'] + 4, count=int(f['length'] / 4))
|
offset=f['hlen'] + 4, count=int(f['length'] / 4))
|
||||||
#b = numpy.bitwise_xor(data, mask).data
|
#b = numpy.bitwise_xor(data, mask).data
|
||||||
b = numpy.bitwise_xor(data, mask).tostring()
|
b = numpy.bitwise_xor(data, mask).tostring()
|
||||||
|
|
Loading…
Reference in New Issue