Skip to content

Sayjad21/file_transfer_system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Transfer System

A Java-based client-server application for transferring files over a network. This project implements a simple file transfer protocol allowing clients to upload and download files from a server.

Features

  • Client-server architecture
  • File upload and download
  • Message logging and user management
  • Chunked data transfer for large files

Prerequisites

  • Java Development Kit (JDK) version 8 or higher
  • Windows operating system (for the provided batch scripts)

Installation

  1. Clone the repository:

    git clone https://github.com/Sayjad21/file_transfer_system.git
    cd your-repo-name
    
  2. Ensure Java is installed:

    java -version
    

Building the Project

The project includes a compilation script. Run it from the project root:

compile.bat

This will compile all Java source files in the src/ directory and place the class files in the bin/ directory.

Running the Application

  1. Start the Server: Open a command prompt in the project directory and run:

    run-server.bat
    

    The server will start listening on the configured port (default: check ServerConfig.java).

  2. Start the Client: Open another command prompt and run:

    run-client.bat
    

    Follow the on-screen prompts to connect to the server and perform file operations.

Project Structure

.
├── cleanup.bat          # Script to clean compiled files
├── compile.bat          # Script to compile the project
├── run-client.bat       # Script to run the client
├── run-server.bat       # Script to run the server
├── src/
│   ├── client/
│   │   ├── FileClient.java
│   │   └── protocol/
│   │       ├── ChunkData.java
│   │       └── Message.java
│   └── server/
│       ├── ActivityLogger.java
│       ├── ClientHandler.java
│       ├── FileManager.java
│       ├── FileMetadata.java
│       ├── FileRequest.java
│       ├── FileServer.java
│       ├── MessageStore.java
│       ├── RequestManager.java
│       ├── ServerConfig.java
│       ├── UploadBuffer.java
│       ├── UserMessage.java
│       └── UserRegistry.java
└── README.md

Configuration

Server configuration can be modified in src/server/ServerConfig.java.

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built with Java
  • Inspired by basic file transfer protocols

About

this was implemented for my socket programming offline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors