Skip to content

Commit de42e2c

Browse files
committed
CRAN release 0.8.2
1 parent 72612e5 commit de42e2c

File tree

10 files changed

+23
-19
lines changed

10 files changed

+23
-19
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: nanonext
22
Type: Package
33
Title: NNG (Nanomsg Next Gen) Lightweight Messaging Library
4-
Version: 0.8.1.9028
4+
Version: 0.8.2
55
Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is
66
a socket library providing high-performance scalability protocols, a
77
cross-platform standard for messaging and communications. Serves as a

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# nanonext 0.8.1.9028
1+
# nanonext 0.8.2
22

33
#### New Features
44

R/context.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@
2424
#'
2525
#' @param socket a Socket.
2626
#' @param verify [default TRUE] logical value whether to verify there is a
27-
#' connection at the socket with the result stored internally (required for
28-
#' features of certain functions). Supplying a non-logical value will error.
27+
#' connection at the socket with the result stored internally within the
28+
#' context (required for features of certain functions). Set to FALSE for
29+
#' performance if not using features which explicitly require verification.
30+
#' Supplying a non-logical value will error.
2931
#'
3032
#' @return A new Context (object of class 'nanoContext' and 'nano').
3133
#'
@@ -161,8 +163,8 @@ reply <- function(context,
161163
#' @param data an object (if send_mode = 'raw', a vector).
162164
#' @param timeout [default NULL] integer value in milliseconds or NULL, which
163165
#' applies a socket-specific default, usually the same as no timeout. The
164-
#' context must have created with \code{context(verify = TRUE)}, or else
165-
#' this value will be ignored.
166+
#' context must have been created with \code{context(verify = TRUE)}, or
167+
#' else this value will be ignored.
166168
#'
167169
#' @return A 'recvAio' (object of class 'recvAio') (invisibly).
168170
#'

R/ncurl.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ ncurl <- function(url,
9797
#' else an 'errorValue'.
9898
#'
9999
#' @examples
100-
#' s <- ncurl_session("https://httpbin.org/get", response = "date", timeout = 1000L)
100+
#' s <- ncurl_session("https://httpbin.org/get", response = "date", timeout = 2000L)
101101
#' s
102102
#' if (!is_error_value(s)) transact(s)
103103
#' if (!is_error_value(s)) close(s)

man/context.Rd

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

man/ncurl_session.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/request.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.

src/aio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,15 +1408,15 @@ SEXP rnng_cv_until(SEXP cvar, SEXP msec) {
14081408
break;
14091409
}
14101410

1411-
uint8_t success = 1;
1411+
uint8_t signalled = 1;
14121412
nng_mtx_lock(mtx);
14131413
while (ncv->condition == 0) {
14141414
if (nng_cv_until(cv, time) == NNG_ETIMEDOUT) {
1415-
success = 0;
1415+
signalled = 0;
14161416
break;
14171417
}
14181418
}
1419-
if (success) ncv->condition--;
1419+
if (signalled) ncv->condition--;
14201420
nng_mtx_unlock(mtx);
14211421

14221422
return ncv->flag ? Rf_ScalarLogical(0) : Rf_ScalarLogical(1);

src/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,8 @@ SEXP rnng_ctx_close(SEXP context) {
467467

468468
if (R_ExternalPtrTag(context) != nano_ContextSymbol)
469469
Rf_error("'context' is not a valid Context");
470-
nng_ctx *ctxp = (nng_ctx *) R_ExternalPtrAddr(context);
471-
const int xc = nng_ctx_close(*ctxp);
470+
nano_ctx *nctx = (nano_ctx *) R_ExternalPtrAddr(context);
471+
const int xc = nng_ctx_close(nctx->ctx);
472472

473473
if (xc)
474474
ERROR_RET(xc);

tests/tests.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,10 @@ nanotest(is_error_value(ncurl("http", async = TRUE)$data))
324324
haio <- ncurl("https://i.i", async = TRUE)
325325
nanotest(is_error_value(call_aio(haio)$raw))
326326
nanotestp(haio$data)
327-
sess <- ncurl_session("https://httpbin.org/post", method = "POST", headers = c(`Content-Type` = "text/plain"), data = "test", response = "server", timeout = 1000L)
327+
sess <- ncurl_session("https://httpbin.org/post", method = "POST", headers = c(`Content-Type` = "text/plain"), data = "test", response = "server", timeout = 2000L)
328328
nanotestnn(sess)
329329
nanotest(is_error_value(sess) || length(transact(sess)) == 4L)
330-
sess <- ncurl_session("https://httpbin.org/post", convert = FALSE, method = "POST", headers = list(`Content-Type` = "text/plain"), response = list("Date", "Server"), timeout = 1000)
330+
sess <- ncurl_session("https://httpbin.org/post", convert = FALSE, method = "POST", headers = list(`Content-Type` = "text/plain"), response = list("Date", "Server"), timeout = 2000)
331331
nanotestnn(sess)
332332
nanotest(is_error_value(sess) || length(transact(sess)) == 4L)
333333
nanotest(is_error_value(sess) || close(sess) == 0L)

0 commit comments

Comments
 (0)