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.
- Host: GitHub
- URL: https://github.com/michael-simons/native-netty-timeserver-and-client
- Owner: michael-simons
- Created: 2020-06-25T13:32:41.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-20T16:35:19.000Z (about 3 years ago)
- Last Synced: 2025-03-27T06:49:10.959Z (over 1 year ago)
- Language: Java
- Size: 54.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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
```