Skip to content

Commit 3f25ba6

Browse files
committed
Update docs to match latest info. Change version schema before
tagging a release to match support for nng 1.8.0.
1 parent 0b17c7d commit 3f25ba6

File tree

3 files changed

+28
-17
lines changed

3 files changed

+28
-17
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ An idiomatic Java wrapper around [nng](https://nng.nanomsg.org) using
2222
> a Java application...but we'll see if/when I get there.
2323
2424
## Current State
25+
As of _15 Aug 2024_, things have been updated to work with `nng 1.8.0` using
26+
Java 11. The only thing added (that was previously missing) were calls to
27+
register the tls service and the ability to set a trusted CA on a client's
28+
`TlsConfig`.
29+
2530
As of _8 Feb 2021_, the core nng primitives are implemented allowing a Java
2631
developer to:
2732

build.gradle

+15-11
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@ plugins {
44
}
55

66
java {
7-
sourceCompatibility = 1.8
8-
targetCompatibility = 1.8
7+
sourceCompatibility = 11
8+
targetCompatibility = 11
99
}
1010

1111
group 'io.sisu'
12-
version '1.8.0-SNAPSHOT'
12+
// Given the versioning pattern x.x.x-y-z, the plan is x.x.x follows the
13+
// expected version of nng supported. The y is the major release of this
14+
// library against that version and z is the patch release of the major.
15+
// Yes, it's a bit ugly, but it follows some conventions blessed by
16+
// Oracle:
17+
// https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN8904
18+
version '1.8.0-0-0'
1319

1420
repositories {
1521
mavenCentral()
@@ -33,8 +39,8 @@ project(':benchmarks') {
3339
apply plugin: 'com.github.johnrengelman.shadow'
3440
apply plugin: 'java'
3541
java {
36-
sourceCompatibility = 1.8
37-
targetCompatibility = 1.8
42+
sourceCompatibility = 11
43+
targetCompatibility = 11
3844
}
3945
group = 'io.sisu.nng'
4046
version = parent.version
@@ -59,8 +65,8 @@ project(':demo') {
5965
apply plugin: 'com.github.johnrengelman.shadow'
6066
apply plugin: 'java'
6167
java {
62-
sourceCompatibility = 1.8
63-
targetCompatibility = 1.8
68+
sourceCompatibility = 11
69+
targetCompatibility = 11
6470
}
6571
group = 'io.sisu.nng'
6672
version = parent.version
@@ -79,21 +85,19 @@ project(':demo') {
7985
}
8086
}
8187

82-
/*
8388
task runDemoAsyncServer(type: JavaExec) {
8489
group = "Execution"
8590
description = "Run the Async Server demo"
8691
classpath = sourceSets.main.runtimeClasspath
87-
main = $/io.sisu.nng.demo.async.Server/$
92+
mainClass = $/io.sisu.nng.demo.async.Server/$
8893
environment "JNA_LIBRARY_PATH", System.getenv("JNA_LIBRARY_PATH")
8994
}
9095

9196
task runDemoAsyncClient(type: JavaExec) {
9297
group = "Execution"
9398
description = "Run the Async Client demo"
9499
classpath = sourceSets.main.runtimeClasspath
95-
main = $/io.sisu.nng.demo.async.Client/$
100+
mainClass = $/io.sisu.nng.demo.async.Client/$
96101
environment "JNA_LIBRARY_PATH", System.getenv("JNA_LIBRARY_PATH")
97102
}
98-
*/
99103
}

demo/README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ $ ./gradlew demo:shadowJar
1313
Running a demo should then be as easy as:
1414

1515
```
16-
$ java -cp ./demo/libs/demo-${version}-all.jar <demo class> <...args>
16+
$ java -cp ./demo/build/libs/demo-${version}-all.jar <demo class> <...args>
1717
```
1818

19+
> You may need to set your JNA_LIBRARY_PATH to find nng!
20+
1921
Where `${version}` is the current version of the nng-java project.
2022

2123
> The upstream nng demos are here:
@@ -40,15 +42,15 @@ The demo is simple:
4042
To start the server, provide a valid nng url to listen on:
4143

4244
```
43-
$ java -cp ./demo/libs/demo-${version}-all.jar \
45+
$ java -cp ./demo/build/libs/demo-${version}-all.jar \
4446
io.sisu.nng.demo.async.Server \
4547
tcp://localhost:9999
4648
```
4749

4850
Then start some clients, providing a "wait time" argument (in milliseconds):
4951

5052
```
51-
$ java -cp ./demo/libs/demo-${version}-all.jar \
53+
$ java -cp ./demo/build/libs/demo-${version}-all.jar \
5254
io.sisu.nng.demo.async.Client \
5355
tcp://localhost:9999 100
5456
```
@@ -73,7 +75,7 @@ is enabled by adding a numeric sleep argument while the server takes a `-s`
7375
flag:
7476

7577
```
76-
$ java -cp ./demo/libs/demo-${version}-all.jar \
78+
$ java -cp ./demo/build/libs/demo-${version}-all.jar \
7779
io.sisu.nng.demo.raw.Raw \
7880
tcp://localhost:9999 [-s | <sleep time in seconds>]
7981
```
@@ -88,15 +90,15 @@ Socket.
8890
For the server, start via:
8991

9092
```
91-
$ java -cp ./demo/libs/demo-${version}-all.jar \
93+
$ java -cp ./demo/build/libs/demo-${version}-all.jar \
9294
io.sisu.nng.demo.reqreq.ReqRep server
9395
tcp://localhost:9999
9496
```
9597

9698
And the client:
9799

98100
```
99-
$ java -cp ./demo/libs/demo-${version}-all.jar \
101+
$ java -cp ./demo/build/libs/demo-${version}-all.jar \
100102
io.sisu.nng.demo.reqreq.ReqRep client
101103
tcp://localhost:9999
102104
```

0 commit comments

Comments
 (0)