def __init__(self): super(FileNode, self).__init__() self.path = '' self.md5 = '' # 初始化加密器 self.encryptor_generator = Encryptor.AES_MD5()
def __init__(self): self.server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # self.server_socket.settimeout(3) self.address = () self.max_supported_devices = 3 self.buff = 1024 self.home_path = '' self.store_path = '' self.client = None # 读取配置文件 self.readConfig() # 绑定地址 self.server_socket.bind(self.address) # 最多三台设备 self.server_socket.listen(int(self.max_supported_devices)) # 初始化加密器 self.encryptor_generator = Encryptor.AES_MD5() self.file_tree = filetree.FileTree() self.file_tree.setStorePath(self.store_path) self.file_tree.setHomePath(self.home_path) self.download_list = [] self.load_gerenator = load.Load(self.buff)
def __init__(self, buff): self.buff = buff self.client = None # 初始化加密器 self.encryptor_generator = Encryptor.AES_MD5()
def __init__(self): self.store_path = '' self.home_path = '' self.download_list = [] self.local_files_list = [] self.remove_list = [] # 初始化加密器 self.encryptor_generator = Encryptor.AES_MD5()
def __init__(self): self.address = () self.local_path = '' self.home_path = '' self.buff = 1024 self.block_size = 1024 self.getConfig() # 连接选项 self.client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.client_socket.connect(self.address) self.file_tree = filetree.FileTree() self.file_tree.storeFilesLocal() # 初始化加密器 self.encryptor_generator = Encryptor.AES_MD5() self.load_generator = load.Load(self.buff) self.load_generator.setClient(self.client_socket)