From e0994e5db85897b8f13866cb05ee825e5a4ece73 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Sun, 30 Oct 2022 03:17:25 +0100 Subject: [PATCH] resources/java/netty-tests: Add maven project This is going to be used for figuring out how Netty operates and whether we should just make our own version or port the existing Netty to C++ and use it as a dependency or whether we even need it at all. --- .gitignore | 4 +- resources/README.md | 2 +- resources/java/netty-tests/README.md | 5 ++ resources/java/netty-tests/pom.xml | 48 +++++++++++++++++++ resources/java/netty-tests/run_client.sh | 22 +++++++++ resources/java/netty-tests/run_server.sh | 22 +++++++++ .../src/main/java/foss_vg/NettyClient.java | 25 ++++++++++ .../src/main/java/foss_vg/NettyServer.java | 25 ++++++++++ 8 files changed, 151 insertions(+), 2 deletions(-) create mode 100644 resources/java/netty-tests/README.md create mode 100644 resources/java/netty-tests/pom.xml create mode 100644 resources/java/netty-tests/run_client.sh create mode 100644 resources/java/netty-tests/run_server.sh create mode 100644 resources/java/netty-tests/src/main/java/foss_vg/NettyClient.java create mode 100644 resources/java/netty-tests/src/main/java/foss_vg/NettyServer.java diff --git a/.gitignore b/.gitignore index 958b0ca..5f8366d 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,8 @@ # Java bytecode *.class +# Maven's build files +/resources/java/netty-tests/target/ # ignore nano's temp files *.swp @@ -24,4 +26,4 @@ #vscode .vscode -writeTest \ No newline at end of file +writeTest diff --git a/resources/README.md b/resources/README.md index db7964b..ee5d485 100644 --- a/resources/README.md +++ b/resources/README.md @@ -10,7 +10,7 @@ Programs to produce data for figuring out how to interact with Java-specific things - `JavaStringGenerator.java`: A simple tool that reads from stdin and outputs Java-style UTF-8 to stdout -- `netty/`: Figure out how Netty operates +- `netty-tests/`: Figure out how Netty operates ## NBT_data/ diff --git a/resources/java/netty-tests/README.md b/resources/java/netty-tests/README.md new file mode 100644 index 0000000..0b89e34 --- /dev/null +++ b/resources/java/netty-tests/README.md @@ -0,0 +1,5 @@ +# Netty Testing + +This sub-project is used to learn how Netty works + +Build with Maven (`mvn compile`). Run with the build scripts. diff --git a/resources/java/netty-tests/pom.xml b/resources/java/netty-tests/pom.xml new file mode 100644 index 0000000..e3038dc --- /dev/null +++ b/resources/java/netty-tests/pom.xml @@ -0,0 +1,48 @@ + + + + 4.0.0 + + foss_vg + netty-tests + 1.0-SNAPSHOT + + netty-tests + https://lostcave.ddnss.de/git/BodgeMaster/FOSS-VG + + + UTF-8 + 1.7 + 1.7 + + + + + io.netty + netty-all + 4.1.84.Final + compile + + + + + + + + + maven-clean-plugin + 3.1.0 + + + maven-compiler-plugin + 3.8.0 + + + + + diff --git a/resources/java/netty-tests/run_client.sh b/resources/java/netty-tests/run_client.sh new file mode 100644 index 0000000..5cb458a --- /dev/null +++ b/resources/java/netty-tests/run_client.sh @@ -0,0 +1,22 @@ +# Copyright 2022, FOSS-VG Developers and Contributers +# +# Author(s): +# BodgeMaster +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# version 3 along with this program. +# If not, see https://www.gnu.org/licenses/agpl-3.0.en.html + +set -e + +cd target/classes +java foss_vg.NettyClient diff --git a/resources/java/netty-tests/run_server.sh b/resources/java/netty-tests/run_server.sh new file mode 100644 index 0000000..865eaad --- /dev/null +++ b/resources/java/netty-tests/run_server.sh @@ -0,0 +1,22 @@ +# Copyright 2022, FOSS-VG Developers and Contributers +# +# Author(s): +# BodgeMaster +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# version 3 along with this program. +# If not, see https://www.gnu.org/licenses/agpl-3.0.en.html + +set -e + +cd target/classes +java foss_vg.NettyServer diff --git a/resources/java/netty-tests/src/main/java/foss_vg/NettyClient.java b/resources/java/netty-tests/src/main/java/foss_vg/NettyClient.java new file mode 100644 index 0000000..e27e98e --- /dev/null +++ b/resources/java/netty-tests/src/main/java/foss_vg/NettyClient.java @@ -0,0 +1,25 @@ +// Copyright 2022, FOSS-VG Developers and Contributers +// +// Author(s): +// BodgeMaster +// +// This program is free software: you can redistribute it and/or modify it +// under the terms of the GNU Affero General Public License as published +// by the Free Software Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied +// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// version 3 along with this program. +// If not, see https://www.gnu.org/licenses/agpl-3.0.en.html + +package foss_vg; + +public class NettyClient { + + public static void main(String[] args) { + } +} diff --git a/resources/java/netty-tests/src/main/java/foss_vg/NettyServer.java b/resources/java/netty-tests/src/main/java/foss_vg/NettyServer.java new file mode 100644 index 0000000..e7c87c1 --- /dev/null +++ b/resources/java/netty-tests/src/main/java/foss_vg/NettyServer.java @@ -0,0 +1,25 @@ +// Copyright 2022, FOSS-VG Developers and Contributers +// +// Author(s): +// BodgeMaster +// +// This program is free software: you can redistribute it and/or modify it +// under the terms of the GNU Affero General Public License as published +// by the Free Software Foundation, version 3. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied +// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// version 3 along with this program. +// If not, see https://www.gnu.org/licenses/agpl-3.0.en.html + +package foss_vg; + +public class NettyServer { + + public static void main(String[] args) { + } +}