GithubHelp home page GithubHelp logo

rn0311 / reliable-data-transfer-protocol Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sgtb3/reliable-data-transfer-protocol

0.0 2.0 0.0 565 KB

Send data reliably over UDP.

Makefile 0.34% Java 99.66%

reliable-data-transfer-protocol's Introduction

Contents

RdtProtocol.java
  • Abstract class that simulates a reliable data transfer protocol.
  • Encapsulates a TcpPacket object in the data field of a UDP datagram.
  • Capable of handling buffer overflow attacks.
  • Drops out-of-order datagrams.
  • Uses TCP/IP/UDP checksum to check for packet corruption.
  • Simulates GBN Protocol for packet loss.
  • Calculates packet Round-Trip-Times.
  • Has debugging functionality.
  • Logs in-order, non-corrupt received packets.
RdtReceiver.java
  • Simulates a reliable receiver.
  • Contains threads for sending and receiving datagrams simultaneously.
RdtSender.java
  • Simulates a reliable sender.
  • Contains threads for sending and receiving datagrams simultaneously.
TcpPacket.java
  • An abstraction of a TCP packet.
  • Contains methods for calculating TCP/IP/UDP 16-bit one's complement checksum, encoding and decoding a byte array to and from a TcpPacket object.
Timer.java
  • An abstraction of a timer.
  • Runs concurrent to Sender and Receiver as a separate thread.
  • At any given time, timer is active for only one sent but not yet acknowledged datagram.
  • Contains methods to calculate the sample, estimated, and deviation from estimate Round-Trip-Times.
Segment.java:
  • An abstraction of a TCP segment containing data.
  • Contains fields to track various segment properties (sent, ACKed, etc.)
Makefile
  • make compiles the .java source files using the javac compiler.
  • make clean will clean all auxiliary .class files.
Usage
    make
    java RdtReceiver <filename> <log_filename> <sender_IP> <sender_port>
                     <listening_port> 
                      optional: <debug>
    java RdtSender   <filename> <log_filename> <receiver_IP> <receiver_port>
                     <listening_port> <window_size>
                      optional: <debug>
  • sender_port and receiver_port must be larger than well-known ports.
  • window_size size must be under 32768.
  • log_filename can optionally be set to stdout.
Example
make
java RdtReceiver recv.jpg stdout localhost 10988 10989 debug
java RdtSender send.jpg sendLog.txt localhost 10989 10988 32767 debug

reliable-data-transfer-protocol's People

Contributors

sgtb3 avatar

Watchers

James Cloos avatar  avatar

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.