Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file transfer server #13

Open
jiin-kim109 opened this issue Jun 12, 2023 · 0 comments
Open

file transfer server #13

jiin-kim109 opened this issue Jun 12, 2023 · 0 comments
Assignees

Comments

@jiin-kim109
Copy link
Member

jiin-kim109 commented Jun 12, 2023

Description:
https://docs.google.com/presentation/d/1Qct7UxwvBhyKCxd5ea97v5wHBfEuC2JSLGO9t8aCb8Y/edit?usp=sharing

Implement file transfer client module.

  1. Create a thread and a socket for continuous communication until the file transfer ends.

  2. 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

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

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@jiin-kim109 and others