Skip to content

Commit 1cbbba0

Browse files
authored
Merge pull request #25 from tlf30/24-release-0.1.0
Release v0.1.0
2 parents a15aa11 + 9cd00c1 commit 1cbbba0

File tree

8 files changed

+345
-30
lines changed

8 files changed

+345
-30
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#### v0.1.0
2-
SSL Support for TCP channel
2+
* SSL Support for TCP channel (#5, #6)
3+
* Optimize network message transport (#4, #11)
4+
* Better logging and enhanced test examples (#9)
5+
* Better error reporting on non-serializable objects in a message (#14, #16)
6+
* Separation of examples and library, and corresponding dependencies (#22)
7+
* Fixed issue where messages would be transferred before connection listeners were notified (#20, #21)
8+
* Fixed issue where dropped sockets would not be detected (#10, #23)
39

410
#### V0.0.0
511
Initial Release

README.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,56 @@
11
# monkey-netty
22
![Build](https://github.com/tlf30/monkey-netty/workflows/Java%20CI%20with%20Gradle/badge.svg)
3-
An implementation of a server-client communication system for jMonkeyEngine using Netty.IO that utilizes both TCP and UDP communication.
4-
See example for server and client in `examples` module
3+
An implementation of a server-client communication system for jMonkeyEngine using Netty.IO that utilizes both TCP and UDP communication.
4+
5+
**Checkout our [Wiki](https://github.com/tlf30/monkey-netty/wiki) for getting started.**
6+
7+
**See example for server and client in `examples` module.**
8+
9+
## Installing with Gradle
10+
In your `build.gradle` you will need to:
11+
12+
1. Include the github repo:
13+
```groovy
14+
repositories {
15+
...
16+
maven {
17+
url = 'https://maven.pkg.github.com/tlf30/monkey-netty'
18+
}
19+
}
20+
```
21+
22+
2. Specify the dependency:
23+
```groovy
24+
dependencies {
25+
...
26+
implementation 'io.tlf.monkeynetty:monkey-netty:0.1.0'
27+
}
28+
```
29+
30+
## Installing with Maven
31+
In your pom.xml you will need to:
32+
33+
1. Include the github repo:
34+
```xml
35+
<repositories>
36+
...
37+
<repository>
38+
<id>monkey-netty</id>
39+
<name>Monkey-Netty GitHub Packages</name>
40+
<url>https://maven.pkg.github.com/tlf30/monkey-netty</url>
41+
</repository>
42+
</repositories>
43+
```
44+
45+
2. Specify the dependency:
46+
```xml
47+
<dependencies>
48+
...
49+
<dependency>
50+
<groupId>io.tlf.monkeynetty</groupId>
51+
<artifactId>monkey-netty</artifactId>
52+
<version>0.1.0</version>
53+
</dependency>
54+
</dependencies>
55+
```
56+

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
allprojects {
2-
version = '0.1.0-SNAPSHOT'
2+
version = '0.1.0'
33
group = "io.tlf.monkeynetty"
44

55
ext {

examples/src/main/java/io/tlf/monkeynetty/test/JmeClient.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ of this software and associated documentation files (the "Software"), to deal
2424

2525
package io.tlf.monkeynetty.test;
2626

27+
import io.netty.handler.logging.LogLevel;
2728
import io.tlf.monkeynetty.ConnectionListener;
2829
import io.tlf.monkeynetty.test.messages.TestUDPBigMessageA;
2930
import io.tlf.monkeynetty.test.messages.TestTCPBigMessageA;
@@ -50,8 +51,9 @@ public class JmeClient extends SimpleApplication {
5051

5152
@Override
5253
public void simpleInitApp() {
53-
client = new NettyClient("test", true, 10000, "localhost");
54+
client = new NettyClient("test", true, 10000, "localhost");
5455
stateManager.attach(client);
56+
client.setLogLevel(LogLevel.INFO);
5557
client.registerListener(new MessageListener() {
5658
@Override
5759
public void onMessage(NetworkMessage msg, NetworkServer server, NetworkClient client) {
@@ -60,7 +62,7 @@ public void onMessage(NetworkMessage msg, NetworkServer server, NetworkClient cl
6062

6163
@Override
6264
public Class<? extends NetworkMessage>[] getSupportedMessages() {
63-
return new Class[] {TestTCPMessage.class, TestUDPMessage.class, TestTCPBigMessageA.class, TestTCPBigMessageB.class, TestUDPBigMessageA.class, TestUDPBigMessageB.class};
65+
return new Class[]{TestTCPMessage.class, TestUDPMessage.class, TestTCPBigMessageA.class, TestTCPBigMessageB.class, TestUDPBigMessageA.class, TestUDPBigMessageB.class};
6466
}
6567
});
6668

monkey-netty/build.gradle

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ plugins {
33
id 'maven-publish'
44
}
55

6+
java {
7+
withJavadocJar()
8+
withSourcesJar()
9+
}
10+
611
publishing {
712
repositories {
813
maven {
@@ -17,6 +22,29 @@ publishing {
1722
publications {
1823
gpr(MavenPublication) {
1924
from(components.java)
25+
pom {
26+
name = 'Monkey Netty'
27+
description = 'A implementation of a server-client communication system for jMonkeyEngine using Netty.IO that utilizes both TCP and UDP communication.'
28+
url = 'https://github.com/tlf30/monkey-netty'
29+
licenses {
30+
license {
31+
name = 'MIT License'
32+
url = 'https://opensource.org/licenses/MIT'
33+
}
34+
}
35+
developers {
36+
developer {
37+
id = 'tlf30'
38+
name = 'Trevor Flynn'
39+
40+
}
41+
}
42+
scm {
43+
connection = 'scm:git:git://github.com/tlf30/monkey-netty.git'
44+
developerConnection = 'scm:git:ssh://tlf30/monkey-netty.git'
45+
url = 'https://github.com/tlf30/monkey-netty/'
46+
}
47+
}
2048
}
2149
}
2250
}

monkey-netty/src/main/java/io/tlf/monkeynetty/NetworkServer.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,35 @@ public interface NetworkServer {
6161
*/
6262
public NetworkProtocol[] getProtocol();
6363

64+
/**
65+
* @return true if the server is currently blocking new connections
66+
*/
67+
public boolean isBlocking();
68+
69+
/**
70+
* Set if the server should block incoming connections. If true
71+
* the server will close all incoming connections immediately without
72+
* performing a handshake after establishing the connection.
73+
*
74+
* @param blocking If the server should block incoming connections.
75+
*/
76+
public void setBlocking(boolean blocking);
77+
78+
/**
79+
* @return The maximum number of connections the server will allow.
80+
*/
81+
public int getMaxConnections();
82+
83+
/**
84+
* This sets the maximum number of connections the server will be allowed to have at any given time.
85+
* If a connection is attempted to the server and the server currently has the maximum number of
86+
* connections, it will immediately close the connection without performing a handshake after establishing
87+
* the connection.
88+
*
89+
* @param maxConnections The maximum number of connections the server will allow.
90+
*/
91+
public void setMaxConnections(int maxConnections);
92+
6493
/**
6594
* Send a message to all clients connected to the server.
6695
*

0 commit comments

Comments
 (0)