PeerCon is a peer-to-peer desktop sharing application built entirely with Java JDK, utilizing no external dependencies.
I started this project while studying Netty. I wanted to explore pure Java networking (Java NIO) without relying on abstraction layers like Netty. I aim to understand the core mechanisms of low-level networking, including UDP hole punching and non-blocking I/O.
- Understood the roles of STUN and TURN servers in direct peer-to-peer communication environments.
- Learned when to use blocking I/O and why a selector is needed to manage multiple sockets with non-blocking I/O.
- Identified the limitations of P2P communication under symmetric NAT/router environments and the need for a TURN server.
- Designed a custom protocol and handled raw data directly.
- Implemented TCP and UDP communication using Java NIO.
- Built screen capture and compression features using Java’s Robot class.
- Implemented direct communication through NAT hole punching.
- Investigated issues caused by symmetric NAT environments and applied appropriate workarounds.
- Understood why private IP-based communication is needed when peers are under the same public IP.
- Designed a custom protocol and handled raw data directly.
- Built TCP and UDP communication features using Java NIO.
git clone https://github.com/clapppp/PeerCon-client.git
cd PeerCon-client/target
java -jar client-1.0.jar

