Overview: Design and implement a multi-client file transfer system using a client-server…
- User
Overview:
Design and implement a multi-client file transfer system using a client-server model in C, python, or Golang, where the server can handle multiple clients simultaneously. The server should authenticate clients, allow them to upload, download, view, and delete files from a server-side directory, and respond to multiple concurrent requests without crashing or losing data. Background:
Modern file transfer systems, such as FTP, are widely used for transferring data between clients and servers in networked environments. Such systems need to support various functionalities like user authentication, file uploading, downloading, and secure data management. Additionally, the system must handle multiple clients simultaneously without sacrificing performance or data integrity. Problem Statement:
You are tasked with implementing a multi-client file transfer system using sockets(this is mandatory) that will:
codeAuthenticate clients based on a predefined list of usernames and passwords. Allow authenticated clients to perform the following actions: Upload Files: Clients should be able to upload files to their specific directory on the server. Download Files: Clients should be able to download files that exist in their directory on the server. View Files: Clients can preview the first 1024 bytes of any file in their directory. Delete Files: Clients can delete any file within their directory on the server. List Files: Clients should be able to request a list of all files stored in their specific directory. Handle multiple clients concurrently, without interference between them. Support a robust signal handling mechanism that ensures the server can safely shut down while maintaining data integrity.Functional Requirements:
code - Assistant