File | Date | Author | Commit |
---|---|---|---|
client | 2018-02-13 |
![]() |
[edbabf] Now actually bumped to version 1.4.1. |
server | 2018-02-13 |
![]() |
[edbabf] Now actually bumped to version 1.4.1. |
shared | 2018-02-13 |
![]() |
[edbabf] Now actually bumped to version 1.4.1. |
.gitignore | 2017-09-28 |
![]() |
[f74c07] initial commit |
LICENSE | 2017-10-31 |
![]() |
[d2d12b] Updated license. |
README.md | 2018-02-13 |
![]() |
[edbabf] Now actually bumped to version 1.4.1. |
pom.xml | 2018-02-13 |
![]() |
[edbabf] Now actually bumped to version 1.4.1. |
Hydra is a network framework built upon Netty.
Hydra is built upon Netty. It is supposed to simplify the process of socket setup in Java. Netty allows high performances and good maintainability of programs built upon it.
And here comes Hydra in. Hydra uses the builder-pattern in order to make the process of socket setup even simpler. Hydra comes with a handy packet system
that allows you to easily create your own packets and send them via the session Hydra creates for you. Furthermore you have the ability to create packets and
listener which just need a simple annotation and will be invoked by Hydra when a packet is received.
Convince yourself by taking a look at the client and server examples.
<dependency>
<groupId>de.datasec</groupId>
<artifactId>hydra</artifactId>
<version>1.4.1-SNAPSHOT</version>
</dependency>
It is planned to push this project into the maven central.
If you don't use maven you can download a release version and include it in your project.
HydraClient client = new Client.Builder("localhost", 8888, new SampleProtocol())
.workerThreads(4)
.option(StandardSocketOptions.TCP_NODELAY, true)
.build();
This is an easy to understand example of how to create a client socket.
In order to make the packet system work, you have to register your created packets and listeners.
For detailed information on how to do that and examples see the client example.
HydraServer server = new Server.Builder("localhost", 8888, new SampleProtocol())
.bossThreads(2)
.workerThreads(4)
.option(StandardSocketOptions.TCP_NODELAY, true)
.build();
This here is an example of how to create a server socket.
In order to make the packet system work, you have to register your created packets and listeners.
For detailed information on how to do that and examples see the server example.
Licensed under the GNU General Public License, Version 3.0 - see the LICENSE file for details.