From f3f4c7592442307c588a27f3b32327223003a0df Mon Sep 17 00:00:00 2001 From: Adriana Draghici Date: Fri, 29 Jan 2010 16:51:56 +0200 Subject: [PATCH] bt_comm: changed message format for starting client --- bt_comm/PROTOCOL | 3 ++- bt_comm/Util.py | 4 +++- bt_comm/server/Util.py | 23 ----------------------- 3 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 bt_comm/server/Util.py diff --git a/bt_comm/PROTOCOL b/bt_comm/PROTOCOL index 29f3836..86d9e8c 100644 --- a/bt_comm/PROTOCOL +++ b/bt_comm/PROTOCOL @@ -33,7 +33,8 @@ Comunicare Client <-> Server exp: {CLIENT:"tribler", BASE_DIR: "/home/p2p/p2p-clients/tribler/", UP_LIMIT: "512", DL_LIMIT:"256", PORT:"9999", DL_DIR:"/this/dir", LOG_DIR:"/this/dir", - OUT_FILE: "output_file", LOF_FILE:"log_file"} + OUT_FILE: "output_file", LOG_FILE:"log_file", + TORRENT: "torrent file"} - dupa fiecare msg 1,2 Serverul trimite un mesaj care indica daca a aparut sau nu vreo eroare 3. Mesaje STOP diff --git a/bt_comm/Util.py b/bt_comm/Util.py index ffd20a9..d762ee3 100644 --- a/bt_comm/Util.py +++ b/bt_comm/Util.py @@ -18,8 +18,10 @@ UP_LIMIT = "upload_limit" DL_LIMIT = "download_limit" DL_DIR = "download_dir" LOG_DIR = "logging_dir" +OUT_FILE = "output_file" +LOG_FILE = "log_file" PORT = "port" - +TORRENT = "torrent_file" #clients TRIBLER = tribler diff --git a/bt_comm/server/Util.py b/bt_comm/server/Util.py deleted file mode 100644 index c844044..0000000 --- a/bt_comm/server/Util.py +++ /dev/null @@ -1,23 +0,0 @@ - -#!/usr/bin/env python - -""" Message types: client -> server """ - -CONFIG_MSG = "0"; -START_MSG = "1"; -STOP_MSG = "2"; -STATUS_MSG = "3"; - - -# xml tags from clients.xml -CLIENT = "client" -FILE = "file" -RUN_TYPE = "run type" -INTERPRETER = "interpreter" -PREFIX = "prefix" -SUFFIX = "suffix" -UP_LIMIT_OPTION = "upload_limit_option" -DL_LIMIT_OPTION = "download_limit_option" -PORT_OPTION = "port_option" -LOG_DIR_OPTION = "logging_dir_option" -DL_DIR_OPTION = "download_dir_option" -- 2.20.1