An open API service indexing awesome lists of open source software.

https://github.com/michael-simons/native-netty-timeserver-and-client

Simple Netty based time server and client that can be natively compiled on GraalVM.
https://github.com/michael-simons/native-netty-timeserver-and-client

Last synced: over 1 year ago
JSON representation

Simple Netty based time server and client that can be natively compiled on GraalVM.

Awesome Lists containing this project

README

          

# Create Netty native binary.

This is the [time server example](https://netty.io/wiki/user-guide-for-4.x.html#wiki-h3-8) from Netty together
with the minimum necessary substitutions to create native images on GraalVM plus a build file that configures
Graals `native-image` tool for you.

## Build and run

You need [Maven](https://maven.apache.org), [GraalVM](https://www.graalvm.org) and GraalVMs [native image tool](https://www.graalvm.org/getting-started/#native-images) for this to work.

Build native images:

```
./mvnw clean package
```

Run the time server on port 4711:

```
./target/server 4711
```

Run the client in a different shell to get the time from the server:

```
./target/client localhost 4711
```