From 2bbdd6cf3a0ea429583a9e4b840e68c238e08a46 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 22 Sep 2012 16:21:17 +0200 Subject: web socket api handler --- module/remote/wsbackend/Dispatcher.py | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'module/remote/wsbackend/Dispatcher.py') diff --git a/module/remote/wsbackend/Dispatcher.py b/module/remote/wsbackend/Dispatcher.py index eb1c9a291..44cc7555e 100644 --- a/module/remote/wsbackend/Dispatcher.py +++ b/module/remote/wsbackend/Dispatcher.py @@ -18,7 +18,6 @@ from mod_pywebsocket import util from mod_pywebsocket.dispatch import Dispatcher as BaseDispatcher -from mod_pywebsocket.msgutil import receive_message, send_message class Dispatcher(BaseDispatcher): @@ -29,25 +28,4 @@ class Dispatcher(BaseDispatcher): self._source_warnings = [] def addHandler(self, path, handler): - self._handler_suite_map[path] = handler - - - -class ApiHandler: - - def do_extra_handshake(self, req): - pass - - def transfer_data(self, req): - - while True: - try: - line = receive_message(req) - except TypeError: # connection closed - return - - print "Got", line - send_message(req, "You send: %s" % line) - - def passive_closing_handshake(self, req): - print "Closed", req \ No newline at end of file + self._handler_suite_map[path] = handler \ No newline at end of file -- cgit v1.2.3