Module rapidoid-net

Network protocol framework

Built on top of Java NIO from scratch

The low-level HTTP API provides access to the extremely fast Rapidoid HTTP server components.

Rapidoid is implemented on top of Java NIO, without native libraries, nor external dependencies.

It is great to see how Java performance can match C++ and outperform all the other languages in network programming.

Designed for performance from day 1

Rapidoid was designed for high performance since its inception, and several parts of it played a critical role:

  • asynchronous I/O processing,
  • minimizing the garbage collection pressure,
  • fast object pools,
  • reusable off-heap buffers,
  • very fast and efficient HTTP parser,
  • and many other optimizations.

Rapidoid as a Network Protocol Framework

You can use Rapidoid as a Network Protocol Framework, to implement your custom TCP-based protocols.

For a quick and easy start, please take a look at the Echo protocol example.
public class Echo {
    public static void main(String[] args) throws Exception {
        TCP.server().protocol(new EchoProtocol()).port(5555).build().start();
public class EchoProtocol implements Protocol {
    public void process(Channel ctx) {
        String line = ctx.readln().toUpperCase();