diff options
author | Peter Åstrand (astrand) <astrand@cendio.se> | 2013-03-20 09:03:18 +0100 |
---|---|---|
committer | Peter Åstrand (astrand) <astrand@cendio.se> | 2013-03-20 09:03:18 +0100 |
commit | 09f3ec7125e49fb396a4747042eee2acffb2c3a7 (patch) | |
tree | 115e059bdf10c81e87bcf0e88b382ed67bb107f0 /tests | |
parent | 95593ac4bf243f6aeed045bc8787f41b0af64980 (diff) | |
download | websockify-09f3ec7125e49fb396a4747042eee2acffb2c3a7.tar.gz |
Rename self.client to self.request, ie adapt to:
>commit b9e1295f7afa34a4c69618609e053af154e477d7
> Prepare for solving https://github.com/kanaka/websockify/issues/71:
>
> Rename self.client to self.request, since this is what standard
> SocketServer request handlers are using.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/echo.py | 8 | ||||
-rwxr-xr-x | tests/load.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/echo.py b/tests/echo.py index d79553e..d151bfb 100755 --- a/tests/echo.py +++ b/tests/echo.py @@ -28,21 +28,21 @@ class WebSocketEcho(WebSocketServer): cqueue = [] c_pend = 0 cpartial = "" - rlist = [self.client] + rlist = [self.request] while True: wlist = [] - if cqueue or c_pend: wlist.append(self.client) + if cqueue or c_pend: wlist.append(self.request) ins, outs, excepts = select.select(rlist, wlist, [], 1) if excepts: raise Exception("Socket exception") - if self.client in outs: + if self.request in outs: # Send queued target data to the client c_pend = self.send_frames(cqueue) cqueue = [] - if self.client in ins: + if self.request in ins: # Receive client data, decode it, and send it back frames, closed = self.recv_frames() cqueue.extend(frames) diff --git a/tests/load.py b/tests/load.py index 0da7265..ba2ebde 100755 --- a/tests/load.py +++ b/tests/load.py @@ -34,7 +34,7 @@ class WebSocketLoad(WebSocketServer): self.recv_cnt = 0 try: - self.responder(self.client) + self.responder(self.request) except: print "accumulated errors:", self.errors self.errors = 0 |