Skip to content

Commit 1f8a010

Browse files
authored
Bring up required libnng version (#81)
* use safer inproc:// in examples * require libnng >= 1.10 * patch for new compilers * add news item
1 parent dd9c1bc commit 1f8a010

File tree

12 files changed

+23
-25
lines changed

12 files changed

+23
-25
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* The abillity to `lock()` and `unlock()` sockets is removed.
77
* Renders it safe to serialize 'nano' and 'aio' objects - they will be inactive when unserialized.
88
* Unified Windows build system now compiles 'libmbedtls' and 'libnng' from source even on R <= 4.1 using Rtools40 or earlier.
9+
* Requires 'libnng' >= 1.10.0.
910

1011
# nanonext 1.5.0
1112

R/aio.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,15 @@ send_aio <- function(con, data, mode = c("serial", "raw"), timeout = NULL, pipe
121121
#'
122122
#' # Signalling a condition variable
123123
#'
124-
#' s1 <- socket("pair", listen = "tcp://127.0.0.1:6546")
124+
#' s1 <- socket("pair", listen = "inproc://cv-example")
125125
#' cv <- cv()
126126
#' msg <- recv_aio(s1, timeout = 100, cv = cv)
127127
#' until(cv, 10L)
128128
#' msg$data
129129
#' close(s1)
130130
#'
131131
#' # in another process in parallel
132-
#' s2 <- socket("pair", dial = "tcp://127.0.0.1:6546")
132+
#' s2 <- socket("pair", dial = "inproc://cv-example")
133133
#' res <- send_aio(s2, c(1.1, 2.2, 3.3), mode = "raw", timeout = 100)
134134
#' close(s2)
135135
#'

R/context.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ close.nanoContext <- function(con, ...) invisible(.Call(rnng_ctx_close, con))
131131
#' @inheritSection send Send Modes
132132
#'
133133
#' @examples
134-
#' req <- socket("req", listen = "tcp://127.0.0.1:6546")
135-
#' rep <- socket("rep", dial = "tcp://127.0.0.1:6546")
134+
#' req <- socket("req", listen = "inproc://req-example")
135+
#' rep <- socket("rep", dial = "inproc://req-example")
136136
#'
137137
#' ctxq <- context(req)
138138
#' ctxp <- context(rep)

R/listdial.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@
7070
#'
7171
#' @examples
7272
#' socket <- socket("rep")
73-
#' dial(socket, url = "tcp://127.0.0.1:6545", autostart = FALSE)
73+
#' dial(socket, url = "inproc://nanodial", autostart = FALSE)
7474
#' socket$dialer
7575
#' start(socket$dialer[[1]])
7676
#' socket$dialer
7777
#' close(socket$dialer[[1]])
7878
#' close(socket)
7979
#'
8080
#' nano <- nano("bus")
81-
#' nano$dial(url = "tcp://127.0.0.1:6546", autostart = FALSE)
81+
#' nano$dial(url = "inproc://nanodial", autostart = FALSE)
8282
#' nano$dialer
8383
#' nano$dialer_start()
8484
#' nano$dialer
@@ -133,15 +133,15 @@ dial <- function(socket, url = "inproc://nanonext", tls = NULL, autostart = TRUE
133133
#'
134134
#' @examples
135135
#' socket <- socket("req")
136-
#' listen(socket, url = "tcp://127.0.0.1:6547", autostart = FALSE)
136+
#' listen(socket, url = "inproc://nanolisten", autostart = FALSE)
137137
#' socket$listener
138138
#' start(socket$listener[[1]])
139139
#' socket$listener
140140
#' close(socket$listener[[1]])
141141
#' close(socket)
142142
#'
143143
#' nano <- nano("bus")
144-
#' nano$listen(url = "tcp://127.0.0.1:6548", autostart = FALSE)
144+
#' nano$listen(url = "inproc://nanolisten", autostart = FALSE)
145145
#' nano$listener
146146
#' nano$listener_start()
147147
#' nano$listener

README.Rmd

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ knitr::opts_chunk$set(
1717

1818
<!-- badges: start -->
1919
[![CRAN status](https://www.r-pkg.org/badges/version/nanonext)](https://CRAN.R-project.org/package=nanonext)
20-
[![R-multiverse status](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcommunity.r-multiverse.org%2Fapi%2Fpackages%2Fnanonext&query=%24.Version&label=r-multiverse)](https://community.r-multiverse.org/nanonext)
2120
[![R-universe status](https://shikokuchuo.r-universe.dev/badges/nanonext?color=3f72af)](https://shikokuchuo.r-universe.dev/nanonext)
2221
[![R-CMD-check](https://github.com/shikokuchuo/nanonext/workflows/R-CMD-check/badge.svg)](https://github.com/shikokuchuo/nanonext/actions)
2322
[![codecov](https://codecov.io/gh/shikokuchuo/nanonext/graph/badge.svg)](https://app.codecov.io/gh/shikokuchuo/nanonext)
@@ -136,7 +135,7 @@ Install the latest release from CRAN:
136135
install.packages("nanonext")
137136
```
138137

139-
The current development version is available from R-universe:
138+
Or the current development version from R-universe:
140139

141140
```{r universe, eval=FALSE}
142141
install.packages("nanonext", repos = "https://shikokuchuo.r-universe.dev")
@@ -146,7 +145,7 @@ install.packages("nanonext", repos = "https://shikokuchuo.r-universe.dev")
146145

147146
#### Linux / Mac / Solaris
148147

149-
Installation from source requires 'libnng' >= v1.6.0 and 'libmbedtls' >= 2.5.0 (suitable installations are automatically detected), or else 'cmake' to compile 'libnng' v1.10.1 and 'libmbedtls' v3.6.2 included within the package sources.
148+
Installation from source requires 'libnng' >= v1.10.0 and 'libmbedtls' >= 2.5.0 (suitable installations are automatically detected), or else 'cmake' to compile 'libnng' v1.10.1 and 'libmbedtls' v3.6.2 included within the package sources.
150149

151150
**It is recommended for optimal performance and stability to let the package automatically compile bundled versions of 'libmbedtls' and 'libnng' during installation.** To ensure the libraries are compiled from source even if system installations are present, set the `NANONEXT_LIBS` environment variable prior to installation e.g. by `Sys.setenv(NANONEXT_LIBS = 1)`.
152151

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
[![CRAN
99
status](https://www.r-pkg.org/badges/version/nanonext)](https://CRAN.R-project.org/package=nanonext)
10-
[![R-multiverse
11-
status](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fcommunity.r-multiverse.org%2Fapi%2Fpackages%2Fnanonext&query=%24.Version&label=r-multiverse)](https://community.r-multiverse.org/nanonext)
1210
[![R-universe
1311
status](https://shikokuchuo.r-universe.dev/badges/nanonext?color=3f72af)](https://shikokuchuo.r-universe.dev/nanonext)
1412
[![R-CMD-check](https://github.com/shikokuchuo/nanonext/workflows/R-CMD-check/badge.svg)](https://github.com/shikokuchuo/nanonext/actions)
@@ -166,7 +164,7 @@ Install the latest release from CRAN:
166164
install.packages("nanonext")
167165
```
168166

169-
The current development version is available from R-universe:
167+
Or the current development version from R-universe:
170168

171169
``` r
172170
install.packages("nanonext", repos = "https://shikokuchuo.r-universe.dev")
@@ -176,7 +174,7 @@ install.packages("nanonext", repos = "https://shikokuchuo.r-universe.dev")
176174

177175
#### Linux / Mac / Solaris
178176

179-
Installation from source requires ‘libnng’ \>= v1.6.0 and ‘libmbedtls’
177+
Installation from source requires ‘libnng’ \>= v1.10.0 and ‘libmbedtls’
180178
\>= 2.5.0 (suitable installations are automatically detected), or else
181179
‘cmake’ to compile ‘libnng’ v1.10.1 and ‘libmbedtls’ v3.6.2 included
182180
within the package sources.

configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ fi
128128

129129
echo "#include <nng/nng.h>
130130
int main() {
131-
#if NNG_MAJOR_VERSION < 1 || NNG_MAJOR_VERSION == 1 && NNG_MINOR_VERSION < 6
131+
#if NNG_MAJOR_VERSION < 1 || NNG_MAJOR_VERSION == 1 && NNG_MINOR_VERSION < 10
132132
*(void *) 0 = 0;
133133
#endif
134134
}" | ${CC} ${NNG_CFLAGS} -xc - -o /dev/null > /dev/null 2>&1
@@ -140,7 +140,7 @@ fi
140140

141141
if [ $? -ne 0 ]
142142
then
143-
echo "Existing 'libnng' >= 1.6 not found"
143+
echo "Existing 'libnng' >= 1.10 not found"
144144
echo "Detecting 'cmake'..."
145145
which cmake
146146
if [ $? -ne 0 ]

man/dial.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/listen.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/recv_aio.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)