Code Monkey home page Code Monkey logo

networksfiletransfer's Introduction

Networks File Transfer

The goal of this project is to use UNIX sockets to create a server and client program connection that can transfer any type of file (binary file) across a local network.

Usage

  1. Compile the respective programs. For e.g., using gcc:
    gcc deliver.c -lpthread -o deliver and gcc server.c -lpthread -o server
  2. Get the current local IP . For e.g., using curl:
    curl ifconfig.me
  3. Run the compiled deliver and server programs on the same network
    Use the following syntax to run the programs: deliver <local IP/server address> <port number> and server <port number>
  4. Use the following command in the running instance of deliver : ftp <filename>
  5. The server will receive the file from the sent packets and create a new exact copy of the sent file by combining the sent packets. The new file will be named new<filename>

Features

  • Uses a packet format and acknowledgement implementation
  • Packets are sent as total_fragments:current_fragment:total_size:filename:filedata
  • The file is fragmented if above the max fragment size and sent and split and reassembled at the server accordingly
  • Client program reads data from the specified file and sends it to the server using the chosen UDP socket
  • Server program reads the file name, creates a corresponding file stream and reads data from the packets to write to the file stream

networksfiletransfer's People

Contributors

jameskokoska avatar vardhanyash avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

vardhanyash

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.