Skip to content

Commit f2d7000

Browse files
committed
nanonext 0.7.0 documentation updates
1 parent 4e9fa52 commit f2d7000

File tree

12 files changed

+55
-23
lines changed

12 files changed

+55
-23
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is
99
utilising 'Aio' objects which automatically resolve upon completion of
1010
asynchronous operations.
1111
Authors@R:
12-
c(person(given = "Charlie",
12+
c(person(given = "Charlie",
1313
family = "Gao",
1414
role = c("aut", "cre"),
1515
email = "[email protected]",

NEWS.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# nanonext 0.6.0.9700 (development)
1+
# nanonext 0.6.0.9700 (0.7.0 release candidate)
2+
3+
*nanonext 0.7 has focused on optimising the API after completing feature additions and performance enhancements; the API is again expected to remain stable after these changes*
24

35
#### New Features
46

@@ -22,6 +24,7 @@
2224

2325
*Other changes:*
2426

27+
* Integer send/recv (and setopt) arguments implemented in 0.5.3 are now documented and considered part of the API. This is a performance feature that skips matching the character argument value.
2528
* Fixes bug introduced in 0.6.0 where Aios returning 'errorValues' are not cached with the class, returning only integer values when accessed subsequently.
2629
* Fixes potential crash when `base64dec()` encounters invalid input data. Error messages have been revised to be more accurate.
2730
* Fixes the `$` method for 'recvAio' objects for when the object has been stopped using `stop_aio()`.
@@ -33,6 +36,8 @@
3336

3437
# nanonext 0.6.0
3538

39+
*The nanonext 0.6 series incorporates significant advances in performance and stability over previous releases*
40+
3641
#### New Features
3742

3843
* Implements `base64enc()` and `base64dec()` base64 encoding and decoding using the 'Mbed TLS' library.
@@ -116,6 +121,8 @@
116121

117122
# nanonext 0.5.0
118123

124+
*nanonext is now considered substantially feature-complete and API-stable*
125+
119126
#### New Features
120127

121128
* `$context()` method added for creating new contexts from nano Objects using supported protocols (i.e. req, rep, sub, surveyor, respondent) - this replaces the `context()` function for nano Objects.

R/context.R

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,16 @@ close.nanoContext <- function(con, ...) invisible(.Call(rnng_ctx_close, con))
8080
#' as a raw vector. Use 'serial' for sending and receiving within R to ensure
8181
#' perfect reproducibility. Use 'raw' for sending vectors of any type (will be
8282
#' converted to a raw byte vector for sending) - essential when interfacing
83-
#' with external applications.
83+
#' with external applications. Alternatively, for performance, specify an
84+
#' integer position in the vector of choices i.e. 1L for 'serial' or 2L for
85+
#' 'raw'.
8486
#' @param recv_mode [default 'serial'] mode of vector to be received - one of
8587
#' 'serial', 'character', 'complex', 'double', 'integer', 'logical',
86-
#' 'numeric', or 'raw'. The default 'serial' means a serialised R object, for
87-
#' the other modes, the raw vector received will be converted into the
88-
#' respective mode.
88+
#' 'numeric', or 'raw'. The default 'serial' means a serialised R object,
89+
#' for the other modes, the raw vector received will be converted into the
90+
#' respective mode. Alternatively, for performance, specify an integer
91+
#' position in the vector of choices e.g. 1L for 'serial', 2L for 'character'
92+
#' etc.
8993
#' @param timeout [default NULL] integer value in milliseconds or NULL, which
9094
#' applies a socket-specific default, usually the same as no timeout. Note
9195
#' that this applies to receiving the request. The total elapsed time would
@@ -183,7 +187,7 @@ reply <- function(context,
183187
#' # works if req and rep are running in parallel in different processes
184188
#' reply(ctxp, execute = function(x) x + 1, timeout = 10)
185189
#' aio <- request(ctxq, data = 2022, timeout = 10)
186-
#' call_aio(aio)
190+
#' call_aio(aio)$data
187191
#'
188192
#' close(req)
189193
#' close(rep)

R/opts.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
#'
2323
#' @param object a Socket, Context, Stream, Listener or Dialer.
2424
#' @param type [default 'bool'] type of option - either 'bool', 'int', 'ms'
25-
#' (duration), 'size', 'string' or 'uint64'.
25+
#' (duration), 'size', 'string' or 'uint64'. Alternatively, for performance,
26+
#' specify an integer position in the vector of choices e.g. 1L for 'bool',
27+
#' 2L for 'int' etc.
2628
#' @param opt name of option, e.g. 'reconnect-time-min', as a character string.
2729
#' See \link{opts}.
2830
#' @param value value of option.

R/sendrecv.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
#' For Streams, 'raw' is the only option and this argument is ignored. Use
2828
#' 'serial' for perfect reproducibility within R, although 'raw' must be used
2929
#' when interfacing with external applications that do not understand R
30-
#' serialisation.
30+
#' serialisation. Alternatively, for performance, specify an integer position
31+
#' in the vector of choices i.e. 1L for 'serial' or 2L for 'raw'.
3132
#' @param block [default NULL] which applies the connection default (see section
3233
#' 'Blocking' below). Specify logical TRUE to block until successful or FALSE
3334
#' to return immediately even if unsuccessful (e.g. if no connection is
@@ -85,6 +86,8 @@ send <- function(con, data, mode = c("serial", "raw"), block = NULL)
8586
#' The default 'serial' means a serialised R object, for the other modes,
8687
#' the raw vector received will be converted into the respective mode.
8788
#' For Streams, 'serial' is not an option and the default is 'character'.
89+
#' Alternatively, for performance, specify an integer position in the vector
90+
#' of choices e.g. 1L for 'serial', 2L for 'character' etc.
8891
#' @param keep.raw [default FALSE] logical flag whether to keep and return the
8992
#' received raw vector along with the converted data. Supplying a non-logical
9093
#' value will error.

man/recv.Rd

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

man/recv_aio.Rd

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

man/reply.Rd

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

man/request.Rd

Lines changed: 9 additions & 5 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 & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)