Implement file transfer client module.
def send_file(self, receiver_ip_addr, receiver_port, chunk_start, chunk_end):
if len(offsets) == 1: # chunk end (exclusive)
pass
if len(offsets) == 2: # chunk start, chunk end
pass
def request_file(
self, destination_filepath, sender_ip_addr, sender_port, chunk_start, chunk_end
):
pass
Description:
https://docs.google.com/presentation/d/1Qct7UxwvBhyKCxd5ea97v5wHBfEuC2JSLGO9t8aCb8Y/edit?usp=sharing
Implement file transfer client module.
Create a thread and a socket for continuous communication until the file transfer ends.
a file server with ServerMode.Receiver should attempt to make connection to opponent file server with ServerMode.Sender. Then, the sender starts transmitting file based on the file info passed in init
Acceptance Criteria:
`
class FileServer:
def init(self, mode: ServerMode, file_info: File, ip_addr, port):
self.file_path = ""
pass
`