Skip to content

Commit 6a6f6ee

Browse files
committed
docs and other cleanups
1 parent 79ae1ff commit 6a6f6ee

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
* Behavioural change: messages have been upgraded to warnings across the package to allow for enhanced reporting of the originating call e.g. via `warnings()` and flexibility in handling via setting `options()`.
1313
* Returned NNG error codes are now all classed as 'errorValue' across the package.
1414
* Unified `send()` and `recv()` functions, and their asynchronous counterparts `send_aio()` and `recv_aio()`, are now S3 generics and can be used across Sockets, Contexts and Streams.
15-
* Revised 'block' argument for `send()` and `recv()` now allows an integer value for setting a timeout (under the hood this wraps an asynchronous send/recv followed by a wait to make it a synchronous function).
15+
* Revised 'block' argument for `send()` and `recv()` now allows an integer value for setting a timeout.
1616
* `send_ctx()` and `recv_ctx()` are deprecated and will be removed in a future package version - the methods for `send()` and `recv()` should be used instead.
17-
* To allow for more flexible practices, logging is now deprecated and being phased out. Logging can still be set via 'NANONEXT_LOG' prior to package load but `logging()` can no longer be used. Logging will be removed entirely in the next package version.
17+
* To allow for more flexible practices, logging is now deprecated and will be removed entirely in the next package version. Logging can still be enabled via 'NANONEXT_LOG' prior to package load but `logging()` is now defunct.
1818
* Internal performance optimisations.
1919

2020
# nanonext 0.3.0

R/aio.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ send_aio.nanoSocket <- function(con, data, mode = c("serial", "raw"), timeout =
5555
aio <- .Call(rnng_send_aio, con, data, timeout)
5656
is.integer(aio) && return(invisible(aio))
5757

58-
result <- data <- con <- NULL
58+
result <- NULL
5959
unresolv <- TRUE
6060
env <- new.env(hash = FALSE)
6161
makeActiveBinding(sym = "result", fun = function(x) {
@@ -84,7 +84,7 @@ send_aio.nanoContext <- function(con, data, mode = c("serial", "raw"), timeout =
8484
aio <- .Call(rnng_ctx_send_aio, con, data, timeout)
8585
is.integer(aio) && return(invisible(aio))
8686

87-
result <- data <- con <- NULL
87+
result <- NULL
8888
unresolv <- TRUE
8989
env <- new.env(hash = FALSE)
9090
makeActiveBinding(sym = "result", fun = function(x) {
@@ -112,7 +112,7 @@ send_aio.nanoStream <- function(con, data, mode = "raw", timeout = -2L) {
112112
aio <- .Call(rnng_stream_send_aio, con, data, timeout)
113113
is.integer(aio) && return(invisible(aio))
114114

115-
result <- data <- con <- NULL
115+
result <- NULL
116116
unresolv <- TRUE
117117
env <- new.env(hash = FALSE)
118118
makeActiveBinding(sym = "result", fun = function(x) {
@@ -210,7 +210,7 @@ recv_aio.nanoSocket <- function(con,
210210
is.integer(aio) && return(invisible(aio))
211211

212212
keep.raw <- missing(keep.raw) || isTRUE(keep.raw)
213-
data <- raw <- con <- NULL
213+
data <- raw <- NULL
214214
unresolv <- TRUE
215215
env <- new.env(hash = FALSE)
216216
if (keep.raw) {
@@ -286,7 +286,7 @@ recv_aio.nanoContext <- function(con,
286286
is.integer(aio) && return(invisible(aio))
287287

288288
keep.raw <- missing(keep.raw) || isTRUE(keep.raw)
289-
data <- raw <- con <- NULL
289+
data <- raw <- NULL
290290
unresolv <- TRUE
291291
env <- new.env(hash = FALSE)
292292
if (keep.raw) {
@@ -363,7 +363,7 @@ recv_aio.nanoStream <- function(con,
363363
is.integer(aio) && return(invisible(aio))
364364

365365
keep.raw <- missing(keep.raw) || isTRUE(keep.raw)
366-
data <- raw <- con <- NULL
366+
data <- raw <- NULL
367367
unresolv <- TRUE
368368
env <- new.env(hash = FALSE)
369369
if (keep.raw) {

R/context.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ request <- function(context,
198198
is.integer(aio) && return(invisible(aio))
199199

200200
keep.raw <- missing(keep.raw) || isTRUE(keep.raw)
201-
data <- raw <- context <- res <- NULL
201+
data <- raw <- NULL
202202
unresolv <- TRUE
203203
env <- new.env(hash = FALSE)
204204
if (keep.raw) {

R/nano.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ nano <- function(protocol = c("pair", "bus", "req", "rep", "push", "pull",
101101
keep.raw = keep.raw)
102102
nano[["recv_aio"]] <- function(mode = c("serial", "character", "complex", "double",
103103
"integer", "logical", "numeric", "raw"),
104-
timeout,
104+
timeout = -2L,
105105
keep.raw = TRUE) recv_aio.nanoSocket(socket,
106106
mode = mode,
107107
timeout = timeout,
@@ -116,10 +116,10 @@ nano <- function(protocol = c("pair", "bus", "req", "rep", "push", "pull",
116116
echo = echo)
117117
nano[["send_aio"]] <- function(data,
118118
mode = c("serial", "raw"),
119-
timeout) send_aio.nanoSocket(socket,
120-
data = data,
121-
mode = mode,
122-
timeout = timeout)
119+
timeout = -2L) send_aio.nanoSocket(socket,
120+
data = data,
121+
mode = mode,
122+
timeout = timeout)
123123
nano[["socket_setopt"]] <- function(type = c("bool", "int", "ms", "size",
124124
"string", "uint64"),
125125
opt,

R/sendrecv.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#' For Contexts and Streams: the default behaviour is blocking with \code{block = TRUE}.
3333
#' This will wait until the send has completed. Set a timeout in this case
3434
#' to ensure that the function returns under all scenarios. As the underlying
35-
#' implementation differs to that for Sockets, it is recommended to set a
36-
#' positive integer value for \code{block} rather than FALSE.
35+
#' implementation uses an asynchronous send with a wait, it is recommended
36+
#' to set a positive integer value for \code{block} rather than FALSE.
3737
#'
3838
#' @examples
3939
#' pub <- socket("pub", dial = "inproc://nanonext")
@@ -167,8 +167,8 @@ send.nanoStream <- function(con,
167167
#' For Contexts and Streams: the default behaviour is blocking with \code{block = TRUE}.
168168
#' This will wait until a message is received. Set a timeout in this case to
169169
#' ensure that the function returns under all scenarios. As the underlying
170-
#' implementation differs to that for Sockets, it is recommended to set a
171-
#' positive integer value for \code{block} rather than FALSE.
170+
#' implementation uses an asynchronous send with a wait, it is recommended
171+
#' to set a positive integer value for \code{block} rather than FALSE.
172172
#'
173173
#' @examples
174174
#' s1 <- socket("bus", listen = "inproc://nanonext")

man/recv.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/send.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)