High-performance, event-driven/reactive network stack for Java 11+
Go to file
Robinson 33f3ca8ebc Supports the newest version of Aeron. Updated error log usage and notifications. Refactored RMI API (now RMI is accessible via '.rmi' calls). Updated unit tests. Added 'delete' to rmi methods (opposite of 'create'). 2021-07-07 00:04:47 +02:00
gradle/wrapper updated gradle 2021-04-24 00:18:43 +02:00
ignored_for_now/discovery More work done on cleaning up stack traces 2020-08-22 22:58:50 +02:00
not-fixed Moved unused code 2021-01-15 14:11:33 +01:00
src/dorkbox/network Supports the newest version of Aeron. Updated error log usage and notifications. Refactored RMI API (now RMI is accessible via '.rmi' calls). Updated unit tests. Added 'delete' to rmi methods (opposite of 'create'). 2021-07-07 00:04:47 +02:00
src9 WIP JPMS 2021-07-02 11:41:05 +02:00
test/dorkboxTest/network Supports the newest version of Aeron. Updated error log usage and notifications. Refactored RMI API (now RMI is accessible via '.rmi' calls). Updated unit tests. Added 'delete' to rmi methods (opposite of 'create'). 2021-07-07 00:04:47 +02:00
.gitignore Updated to use Gradle Utils for gradle/project update management 2019-05-13 15:18:33 +02:00
LICENSE Supports the newest version of Aeron. Updated error log usage and notifications. Refactored RMI API (now RMI is accessible via '.rmi' calls). Updated unit tests. Added 'delete' to rmi methods (opposite of 'create'). 2021-07-07 00:04:47 +02:00
LICENSE.Apachev2 Added license info. 2016-03-08 03:16:38 +01:00
LICENSE.BSD2 Converted to gradle 2018-08-18 23:15:46 +02:00
LICENSE.BSD3 Added license info. 2016-03-08 03:16:38 +01:00
LICENSE.CC0 Added more license files 2020-08-09 13:35:47 +02:00
LICENSE.EPL Added more license files 2020-08-09 13:35:47 +02:00
LICENSE.GPLv2_CP updated license info 2021-04-24 00:18:34 +02:00
LICENSE.MIT Added license info. 2016-03-08 03:16:38 +01:00
LICENSE.OLDAPv2.8 Updated license 2020-10-05 15:14:47 +02:00
README.md updated version 2021-04-30 22:42:37 +02:00
build.gradle.kts Supports the newest version of Aeron. Updated error log usage and notifications. Refactored RMI API (now RMI is accessible via '.rmi' calls). Updated unit tests. Added 'delete' to rmi methods (opposite of 'create'). 2021-07-07 00:04:47 +02:00
gradlew updated gradle 2021-04-24 00:18:43 +02:00
gradlew.bat updated gradle 2021-04-24 00:18:43 +02:00
logback.xml before kotlin conversion 2020-06-04 23:24:24 +02:00
settings.gradle.kts No longer depend on Utilities project, but on it's compiled sources. 2019-01-14 01:37:10 +01:00

README.md

Network

Dorkbox Github Gitlab Bitbucket

The Network project is an encrypted, high-performance, event-driven/reactive Network stack with DNS and RMI, using Netty, Kryo, KryoNet RMI, and LZ4 via TCP/UDP.

These are the main features:

  • The connection between endpoints is AES256-GCM / EC curve25519.

  • The connection data is LZ4 compressed and byte-packed for small payload sizes.

  • The connection supports:

  • Remote Method Invocation

    • Blocking
    • Non-Blocking
    • Void returns
    • Exceptions can be returned
  • Sending data when Idle

  • "Pinging" the remote end (for measuring round-trip time)

  • Firewall connections by IP+CIDR

  • Specify the connection type (nothing, compress, compress+encrypt)

  • The available transports are TCP and UDP

  • There are simple wrapper classes for:

    • Server
    • Client
    • MultiCast Broadcast client and server discovery
  • Note: There is a maximum packet size for UDP, 508 bytes to guarantee it's unfragmented

  • This is for cross-platform use, specifically - linux 32/64, mac 64, and windows 32/64. Java 1.8+

public static
class AMessage {
    public
    AMessage() {
    }
}

KryoCryptoSerializationManager.DEFAULT.register(AMessage.class);

Configuration configuration = new Configuration();
configuration.tcpPort = tcpPort;
configuration.host = host;

final Server server = new Server(configuration);
addEndPoint(server);
server.bind(false);

server.listeners()
      .add(new Listener<AMessage>() {
          @Override
          public
          void received(Connection connection, AMessage object) {
              System.err.println("Server received message from client. Bouncing back.");
              connection.send()
                        .TCP(object);
          }
      });

Client client = new Client(configuration);
client.disableRemoteKeyValidation();
addEndPoint(client);
client.connect(5000);

client.listeners()
      .add(new Listener<AMessage>() {
          @Override
          public
          void received(Connection connection, AMessage object) {
              ClientSendTest.this.checkPassed.set(true);
              System.err.println("Tada! It's been bounced back.");
              server.stop();
          }
      });

client.send()
      .TCP(new AMessage());

   

Maven Info

<dependencies>
    ...
    <dependency>
      <groupId>com.dorkbox</groupId>
      <artifactId>Network</artifactId>
      <version>5.2</version>
    </dependency>
</dependencies>

Gradle Info

dependencies {
    ...
    implementation("com.dorkbox:Network:5.2")
}

License

This project is © 2021 dorkbox llc, and is distributed under the terms of the Apache v2.0 License. See file "LICENSE" for further references.