Skip to content

Mutithreading screen sharing system with my own RTP created from scratch on top of the raw TCP and UDP socket API.

License

Notifications You must be signed in to change notification settings

milosz08/screen-sharing-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screen sharing system

[YouTube demo] | [About project]

Secured screen sharing system created with low-level Socket API written in Java SE 1.8 with JCA, JCE and Swing UI. Uses event-based reactive programming with observer pattern supplied by RxJava library.

Table of content

Project info

Sequence diagram

Error correction system

App supports HD resolution, so each frame is split into smaller chunks due to the maximum UDP frame size (65kb). I decided to create simple error correction system, because UDP protocol can loose the packets which caused visible artifacts in result video stream.

Host state diagram
Client state diagram

Note

If the image fragments were not transmitted in the correct order, frame is not displayed in the user interface. Solves the problem of displaying artifacts in the image.

Gallery

Host window

Client window

Clone and install

To install the program on your computer, use the command below (or use the build-in GIT system in your IDE environment):

$ git clone https://github.com/milosz08/screen-sharing-system

Build and run

  1. Firstly, clean output .bin directory via:
$ ./mvnw clean      # for UNIX
.\mvnw.cmd clean    # for Windows
  1. Build and install shared library via:
$ ./mvnw package install -pl lib      # for UNIX
.\mvnw.cmd package install -pl lib    # for Windows
  1. Create executable JAR file for modules:
$ ./mvnw package -pl <module>         # for UNIX
.\mvnw.cmd package -pl <module>       # for Windows

where <module> is client or host.

  1. Optionally, build all modules via:
$ ./mvnw package -pl client,host      # for UNIX
.\mvnw.cmd package -pl client,host    # for Windows

Note

All executable JAR files will be available in .bin directory.

  1. To run host or client, type:
$ java -Xms<memory> -Xmx<memory> -jar <module>.jar

where:

  • <memory>: ex. 512m or 2g
  • <module>: ex. client or host

Tech stack

  • Java SE 1.8,
  • JCA (Java Cryptography Architecture),
  • JCE (Java Cryptography Extension),
  • Swing UI, AWT,
  • RxJava (reactive pattern),
  • Imgscalr (image processing),
  • Apache Commons Lang, IO (utilities),
  • Logback with Slf4j api,
  • JFreeChart (data transfer linear plot),
  • Bcrypt (password hashing),
  • Lombok (accessor annotations),
  • Jackson (json processing).

License

This project is licensed under the Apache 2.0 License.

About

Mutithreading screen sharing system with my own RTP created from scratch on top of the raw TCP and UDP socket API.

Resources

License

Stars

Watchers

Forks

Languages