Skip to content

Commit 0086be6

Browse files
committed
initial commit - wrap and test basic nng features
Handrolled some wrapping code using JNA. Objective is to just wrap and expose the "public" parts of nng. (Other projects seem to use code generators and expose all the nni_* stuff...which is pointless.) Basic test provided for ReqRep0 one-way send of an nng_msg. Starting to think about how to wrap the major concepts (Socket, Message, Dialer, Listener, Context) into higher level POJOs that are more idiomatic or at least hide the JNA stuff like Pointers.
0 parents  commit 0086be6

25 files changed

+1067
-0
lines changed

.gitignore

+227
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
2+
# Created by https://www.toptal.com/developers/gitignore/api/gradle,java,intellij,vim,emacs
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=gradle,java,intellij,vim,emacs
4+
5+
### Emacs ###
6+
# -*- mode: gitignore; -*-
7+
*~
8+
\#*\#
9+
/.emacs.desktop
10+
/.emacs.desktop.lock
11+
*.elc
12+
auto-save-list
13+
tramp
14+
.\#*
15+
16+
# Org-mode
17+
.org-id-locations
18+
*_archive
19+
20+
# flymake-mode
21+
*_flymake.*
22+
23+
# eshell files
24+
/eshell/history
25+
/eshell/lastdir
26+
27+
# elpa packages
28+
/elpa/
29+
30+
# reftex files
31+
*.rel
32+
33+
# AUCTeX auto folder
34+
/auto/
35+
36+
# cask packages
37+
.cask/
38+
dist/
39+
40+
# Flycheck
41+
flycheck_*.el
42+
43+
# server auth directory
44+
/server/
45+
46+
# projectiles files
47+
.projectile
48+
49+
# directory configuration
50+
.dir-locals.el
51+
52+
# network security
53+
/network-security.data
54+
55+
56+
### Intellij ###
57+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
58+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
59+
60+
# Ignore all idea stuff
61+
.idea/
62+
63+
# User-specific stuff
64+
.idea/**/workspace.xml
65+
.idea/**/tasks.xml
66+
.idea/**/usage.statistics.xml
67+
.idea/**/dictionaries
68+
.idea/**/shelf
69+
70+
# Generated files
71+
.idea/**/contentModel.xml
72+
73+
# Sensitive or high-churn files
74+
.idea/**/dataSources/
75+
.idea/**/dataSources.ids
76+
.idea/**/dataSources.local.xml
77+
.idea/**/sqlDataSources.xml
78+
.idea/**/dynamic.xml
79+
.idea/**/uiDesigner.xml
80+
.idea/**/dbnavigator.xml
81+
82+
# Gradle
83+
.idea/**/gradle.xml
84+
.idea/**/libraries
85+
86+
# Gradle and Maven with auto-import
87+
# When using Gradle or Maven with auto-import, you should exclude module files,
88+
# since they will be recreated, and may cause churn. Uncomment if using
89+
# auto-import.
90+
# .idea/artifacts
91+
# .idea/compiler.xml
92+
# .idea/jarRepositories.xml
93+
# .idea/modules.xml
94+
# .idea/*.iml
95+
# .idea/modules
96+
# *.iml
97+
# *.ipr
98+
99+
# CMake
100+
cmake-build-*/
101+
102+
# Mongo Explorer plugin
103+
.idea/**/mongoSettings.xml
104+
105+
# File-based project format
106+
*.iws
107+
108+
# IntelliJ
109+
out/
110+
111+
# mpeltonen/sbt-idea plugin
112+
.idea_modules/
113+
114+
# JIRA plugin
115+
atlassian-ide-plugin.xml
116+
117+
# Cursive Clojure plugin
118+
.idea/replstate.xml
119+
120+
# Crashlytics plugin (for Android Studio and IntelliJ)
121+
com_crashlytics_export_strings.xml
122+
crashlytics.properties
123+
crashlytics-build.properties
124+
fabric.properties
125+
126+
# Editor-based Rest Client
127+
.idea/httpRequests
128+
129+
# Android studio 3.1+ serialized cache file
130+
.idea/caches/build_file_checksums.ser
131+
132+
### Intellij Patch ###
133+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
134+
135+
# *.iml
136+
# modules.xml
137+
# .idea/misc.xml
138+
# *.ipr
139+
140+
# Sonarlint plugin
141+
# https://plugins.jetbrains.com/plugin/7973-sonarlint
142+
.idea/**/sonarlint/
143+
144+
# SonarQube Plugin
145+
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
146+
.idea/**/sonarIssues.xml
147+
148+
# Markdown Navigator plugin
149+
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
150+
.idea/**/markdown-navigator.xml
151+
.idea/**/markdown-navigator-enh.xml
152+
.idea/**/markdown-navigator/
153+
154+
# Cache file creation bug
155+
# See https://youtrack.jetbrains.com/issue/JBR-2257
156+
.idea/$CACHE_FILE$
157+
158+
# CodeStream plugin
159+
# https://plugins.jetbrains.com/plugin/12206-codestream
160+
.idea/codestream.xml
161+
162+
### Java ###
163+
# Compiled class file
164+
*.class
165+
166+
# Log file
167+
*.log
168+
169+
# BlueJ files
170+
*.ctxt
171+
172+
# Mobile Tools for Java (J2ME)
173+
.mtj.tmp/
174+
175+
# Package Files #
176+
*.jar
177+
*.war
178+
*.nar
179+
*.ear
180+
*.zip
181+
*.tar.gz
182+
*.rar
183+
184+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
185+
hs_err_pid*
186+
187+
### Vim ###
188+
# Swap
189+
[._]*.s[a-v][a-z]
190+
!*.svg # comment out if you don't need vector files
191+
[._]*.sw[a-p]
192+
[._]s[a-rt-v][a-z]
193+
[._]ss[a-gi-z]
194+
[._]sw[a-p]
195+
196+
# Session
197+
Session.vim
198+
Sessionx.vim
199+
200+
# Temporary
201+
.netrwhist
202+
# Auto-generated tag files
203+
tags
204+
# Persistent undo
205+
[._]*.un~
206+
207+
### Gradle ###
208+
.gradle
209+
build/
210+
211+
# Ignore Gradle GUI config
212+
gradle-app.setting
213+
214+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
215+
!gradle-wrapper.jar
216+
217+
# Cache of project
218+
.gradletasknamecache
219+
220+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
221+
# gradle/wrapper/gradle-wrapper.properties
222+
223+
### Gradle Patch ###
224+
**/build/
225+
226+
# End of https://www.toptal.com/developers/gitignore/api/gradle,java,intellij,vim,emacs
227+

build.gradle

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
plugins {
2+
id 'java'
3+
}
4+
5+
group 'io.sisu'
6+
version '1.3.2-SNAPSHOT'
7+
8+
repositories {
9+
mavenCentral()
10+
}
11+
12+
dependencies {
13+
implementation 'net.java.dev.jna:jna:5.6.0'
14+
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
15+
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
16+
}
17+
18+
test {
19+
useJUnitPlatform()
20+
}

gradle/wrapper/gradle-wrapper.jar

57.8 KB
Binary file not shown.
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)