From debc926612427a64bc58e694f9ce881cbfd59a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C3=85strand=20=28astrand=29?= Date: Mon, 18 Mar 2013 13:22:48 +0100 Subject: [PATCH] Renamed CustomProxyServer to WebSocketProxy; this was the earlier name. Also, call the server instance "server", not "httpd", even when using LibProxyServer. --- websockify/websocketproxy.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/websockify/websocketproxy.py b/websockify/websocketproxy.py index f49a497..995b937 100755 --- a/websockify/websocketproxy.py +++ b/websockify/websocketproxy.py @@ -22,7 +22,7 @@ except: from cgi import parse_qs from urlparse import urlparse -class CustomProxyServer(websocket.WebSocketServer): +class WebSocketProxy(websocket.WebSocketServer): """ Proxy traffic to and from a WebSockets client to a normal TCP socket server target. All traffic to/from the client is base64 @@ -400,17 +400,16 @@ def websockify_init(): del opts.libserver if libserver: # Use standard Python SocketServer framework - httpd = LibProxyServer(ProxyRequestHandler, **opts.__dict__) - httpd.serve_forever() + server = LibProxyServer(ProxyRequestHandler, **opts.__dict__) else: # Use internal service framework - server = CustomProxyServer(ProxyRequestHandler, **opts.__dict__) - server.start_server() + server = WebSocketProxy(ProxyRequestHandler, **opts.__dict__) + server.start_server() class LibProxyServer(SocketServer.ForkingMixIn, BaseHTTPServer.HTTPServer): """ - Just like CustomProxyServer, but uses standard Python SocketServer + Just like WebSocketProxy, but uses standard Python SocketServer framework. """