Giter VIP home page Giter VIP logo

simple-transport-protocol's Introduction

simple-transport-protocol

A simple transport protocol on top of a lower level communication stack.

Running the application

Run Test called TransportProtocolTest from package transLayer and it will run a test on the abstract class implementation of the protocol

Requirements

  • the program requires JUnit, Log4j, Mockito, Maven and java.util classes.

Ouputs

  • no outputs are generated, in future we'll add support to send transmission logs to file. We currently log at info/error levels to console.

Introduction

A transport protocol on top of the provided link-layer that is capable of reliable transmission of the data having arbitrary size.

The communication stack provides a link layer that is capable of transmitting data in chunks of 20 bytes. The link layer doesn't give any transmission order guaranties. Data loss or corruption error in the link layer is unlikely but can occur. The link-layer provides API consisting of the asynchronous callback on data arrival and synchronous call to send data.

Assuming the following interfaces for link layer:

public interface ILinkLayer {
/**
* Sends data to the remote part
* @param data data to send
*/
boolean send(byte[] data);
/**
* Subscription for data listeners
* @param listener listener object
*/
void subscribeReceiveListener(IDataReceiveListener listener);
}
public interface IDataReceiveListener {
/**
* @param data from the lower layer
*/
void onData(byte[] data);
}

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.