diff --git a/.agignore b/.agignore deleted file mode 100644 index af8404c..0000000 --- a/.agignore +++ /dev/null @@ -1 +0,0 @@ -static/scripts/three.js diff --git a/server/server.py b/server/server.py deleted file mode 100644 index 485cfe0..0000000 --- a/server/server.py +++ /dev/null @@ -1,33 +0,0 @@ -from websocket_server import WebsocketServer -import threading -import abp -import json - -clients = [] - -def new_message(client, server, message): - decoded_message = json.loads(message) - if "diff" in decoded_message: - server.send_message_to_all(message) - elif "method" in decoded_message: - message = compute_diff(decoded_message) - server.send_message_to_all(message) - else: - print "Could not interpret message" - - -def new_client(client, server): - print "Client {} connected.".format(client["id"]) - clients.append(client) - -def client_left(client, server): - print "Client {} disconnected.".format(client["id"]) - clients.remove(client) - -if __name__ == '__main__': - server = WebsocketServer(5001) - server.set_fn_new_client(new_client) - server.set_fn_message_received(new_message) - server.set_fn_client_left(client_left) - server.run_forever() -