diff --git a/NEWS.md b/NEWS.md index f541375de..5a451d668 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,7 @@ * The abillity to `lock()` and `unlock()` sockets is removed. * Renders it safe to serialize 'nano' and 'aio' objects - they will be inactive when unserialized. * Unified Windows build system now compiles 'libmbedtls' and 'libnng' from source even on R <= 4.1 using Rtools40 or earlier. +* Requires 'libnng' >= 1.10.0. # nanonext 1.5.0 diff --git a/R/aio.R b/R/aio.R index 1df0800bc..b0560a9dc 100644 --- a/R/aio.R +++ b/R/aio.R @@ -121,7 +121,7 @@ send_aio <- function(con, data, mode = c("serial", "raw"), timeout = NULL, pipe #' #' # Signalling a condition variable #' -#' s1 <- socket("pair", listen = "tcp://127.0.0.1:6546") +#' s1 <- socket("pair", listen = "inproc://cv-example") #' cv <- cv() #' msg <- recv_aio(s1, timeout = 100, cv = cv) #' until(cv, 10L) @@ -129,7 +129,7 @@ send_aio <- function(con, data, mode = c("serial", "raw"), timeout = NULL, pipe #' close(s1) #' #' # in another process in parallel -#' s2 <- socket("pair", dial = "tcp://127.0.0.1:6546") +#' s2 <- socket("pair", dial = "inproc://cv-example") #' res <- send_aio(s2, c(1.1, 2.2, 3.3), mode = "raw", timeout = 100) #' close(s2) #' diff --git a/R/context.R b/R/context.R index c39f5401a..c653f58ca 100644 --- a/R/context.R +++ b/R/context.R @@ -131,8 +131,8 @@ close.nanoContext <- function(con, ...) invisible(.Call(rnng_ctx_close, con)) #' @inheritSection send Send Modes #' #' @examples -#' req <- socket("req", listen = "tcp://127.0.0.1:6546") -#' rep <- socket("rep", dial = "tcp://127.0.0.1:6546") +#' req <- socket("req", listen = "inproc://req-example") +#' rep <- socket("rep", dial = "inproc://req-example") #' #' ctxq <- context(req) #' ctxp <- context(rep) diff --git a/R/listdial.R b/R/listdial.R index 5d08ebd35..a5fa0229b 100644 --- a/R/listdial.R +++ b/R/listdial.R @@ -70,7 +70,7 @@ #' #' @examples #' socket <- socket("rep") -#' dial(socket, url = "tcp://127.0.0.1:6545", autostart = FALSE) +#' dial(socket, url = "inproc://nanodial", autostart = FALSE) #' socket$dialer #' start(socket$dialer[[1]]) #' socket$dialer @@ -78,7 +78,7 @@ #' close(socket) #' #' nano <- nano("bus") -#' nano$dial(url = "tcp://127.0.0.1:6546", autostart = FALSE) +#' nano$dial(url = "inproc://nanodial", autostart = FALSE) #' nano$dialer #' nano$dialer_start() #' nano$dialer @@ -133,7 +133,7 @@ dial <- function(socket, url = "inproc://nanonext", tls = NULL, autostart = TRUE #' #' @examples #' socket <- socket("req") -#' listen(socket, url = "tcp://127.0.0.1:6547", autostart = FALSE) +#' listen(socket, url = "inproc://nanolisten", autostart = FALSE) #' socket$listener #' start(socket$listener[[1]]) #' socket$listener @@ -141,7 +141,7 @@ dial <- function(socket, url = "inproc://nanonext", tls = NULL, autostart = TRUE #' close(socket) #' #' nano <- nano("bus") -#' nano$listen(url = "tcp://127.0.0.1:6548", autostart = FALSE) +#' nano$listen(url = "inproc://nanolisten", autostart = FALSE) #' nano$listener #' nano$listener_start() #' nano$listener diff --git a/README.Rmd b/README.Rmd index d0ddfb9d7..ba636e4fd 100644 --- a/README.Rmd +++ b/README.Rmd @@ -17,7 +17,6 @@ knitr::opts_chunk$set( [![CRAN status](https://www.r-pkg.org/badges/version/nanonext)](https://CRAN.R-project.org/package=nanonext) -[![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) [![R-universe status](https://shikokuchuo.r-universe.dev/badges/nanonext?color=3f72af)](https://shikokuchuo.r-universe.dev/nanonext) [![R-CMD-check](https://github.com/shikokuchuo/nanonext/workflows/R-CMD-check/badge.svg)](https://github.com/shikokuchuo/nanonext/actions) [![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: install.packages("nanonext") ``` -The current development version is available from R-universe: +Or the current development version from R-universe: ```{r universe, eval=FALSE} install.packages("nanonext", repos = "https://shikokuchuo.r-universe.dev") @@ -146,7 +145,7 @@ install.packages("nanonext", repos = "https://shikokuchuo.r-universe.dev") #### Linux / Mac / Solaris -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. +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. **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)`. diff --git a/README.md b/README.md index d9e54b6b3..4681d3ef2 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,6 @@ [![CRAN status](https://www.r-pkg.org/badges/version/nanonext)](https://CRAN.R-project.org/package=nanonext) -[![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) [![R-universe status](https://shikokuchuo.r-universe.dev/badges/nanonext?color=3f72af)](https://shikokuchuo.r-universe.dev/nanonext) [![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: install.packages("nanonext") ``` -The current development version is available from R-universe: +Or the current development version from R-universe: ``` r install.packages("nanonext", repos = "https://shikokuchuo.r-universe.dev") @@ -176,7 +174,7 @@ install.packages("nanonext", repos = "https://shikokuchuo.r-universe.dev") #### Linux / Mac / Solaris -Installation from source requires ‘libnng’ \>= v1.6.0 and ‘libmbedtls’ +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. diff --git a/configure b/configure index dc5980093..59bdd40e6 100755 --- a/configure +++ b/configure @@ -128,7 +128,7 @@ fi echo "#include int main() { -#if NNG_MAJOR_VERSION < 1 || NNG_MAJOR_VERSION == 1 && NNG_MINOR_VERSION < 6 +#if NNG_MAJOR_VERSION < 1 || NNG_MAJOR_VERSION == 1 && NNG_MINOR_VERSION < 10 *(void *) 0 = 0; #endif }" | ${CC} ${NNG_CFLAGS} -xc - -o /dev/null > /dev/null 2>&1 @@ -140,7 +140,7 @@ fi if [ $? -ne 0 ] then - echo "Existing 'libnng' >= 1.6 not found" + echo "Existing 'libnng' >= 1.10 not found" echo "Detecting 'cmake'..." which cmake if [ $? -ne 0 ] diff --git a/man/dial.Rd b/man/dial.Rd index afdbeb6d8..d90af077b 100644 --- a/man/dial.Rd +++ b/man/dial.Rd @@ -74,7 +74,7 @@ closed when their associated socket is closed. \examples{ socket <- socket("rep") -dial(socket, url = "tcp://127.0.0.1:6545", autostart = FALSE) +dial(socket, url = "inproc://nanodial", autostart = FALSE) socket$dialer start(socket$dialer[[1]]) socket$dialer @@ -82,7 +82,7 @@ close(socket$dialer[[1]]) close(socket) nano <- nano("bus") -nano$dial(url = "tcp://127.0.0.1:6546", autostart = FALSE) +nano$dial(url = "inproc://nanodial", autostart = FALSE) nano$dialer nano$dialer_start() nano$dialer diff --git a/man/listen.Rd b/man/listen.Rd index 9f3b541ee..38d73fce4 100644 --- a/man/listen.Rd +++ b/man/listen.Rd @@ -71,7 +71,7 @@ closed when their associated socket is closed. \examples{ socket <- socket("req") -listen(socket, url = "tcp://127.0.0.1:6547", autostart = FALSE) +listen(socket, url = "inproc://nanolisten", autostart = FALSE) socket$listener start(socket$listener[[1]]) socket$listener @@ -79,7 +79,7 @@ close(socket$listener[[1]]) close(socket) nano <- nano("bus") -nano$listen(url = "tcp://127.0.0.1:6548", autostart = FALSE) +nano$listen(url = "inproc://nanolisten", autostart = FALSE) nano$listener nano$listener_start() nano$listener diff --git a/man/recv_aio.Rd b/man/recv_aio.Rd index 7388685f2..a59b4edd6 100644 --- a/man/recv_aio.Rd +++ b/man/recv_aio.Rd @@ -94,7 +94,7 @@ close(s2) # Signalling a condition variable -s1 <- socket("pair", listen = "tcp://127.0.0.1:6546") +s1 <- socket("pair", listen = "inproc://cv-example") cv <- cv() msg <- recv_aio(s1, timeout = 100, cv = cv) until(cv, 10L) @@ -102,7 +102,7 @@ msg$data close(s1) # in another process in parallel -s2 <- socket("pair", dial = "tcp://127.0.0.1:6546") +s2 <- socket("pair", dial = "inproc://cv-example") res <- send_aio(s2, c(1.1, 2.2, 3.3), mode = "raw", timeout = 100) close(s2) diff --git a/man/reply.Rd b/man/reply.Rd index 12f885e9a..424f86291 100644 --- a/man/reply.Rd +++ b/man/reply.Rd @@ -79,8 +79,8 @@ corresponding to the vector sent should be used. } \examples{ -req <- socket("req", listen = "tcp://127.0.0.1:6546") -rep <- socket("rep", dial = "tcp://127.0.0.1:6546") +req <- socket("req", listen = "inproc://req-example") +rep <- socket("rep", dial = "inproc://req-example") ctxq <- context(req) ctxp <- context(rep) diff --git a/src/nng-110.tar.xz b/src/nng-110.tar.xz index 7b869d32a..6e4477ca2 100644 Binary files a/src/nng-110.tar.xz and b/src/nng-110.tar.xz differ