Releases: shikokuchuo/nanonext
Releases · shikokuchuo/nanonext
CRAN release 0.10.0
nanonext 0.10.0
New Features
ncurl_aio()
has been separated into a dedicated function for async http requests.- Receive functions add
mode = 'string'
as a faster alternative to 'character' when receiving a scalar value.
Updates
Please review the following potentially breaking changes, and only update when ready:
ncurl()
argument 'async' is retired. Please usencurl_aio()
for asynchronous requests.ncurl()
now always returns the response message body at$data
whether convert is TRUE or FALSE.- The argument 'keep.raw' for all receive functions (previously-deprecated) is removed.
cv_reset()
andcv_signal()
now both return invisible zero rather than NULL.- Function
device()
is removed partially due to its non-interruptible blocking behaviour.
Other changes:
- Improvements to recv (mode = 'serial') and
ncurl()
:- Failure to unserialize, or convert to character, automatically saves the data as a raw vector for recovery, generating a warning instead of an error (as was the case prior to v0.9.2).
- Improvements to vector send/recv (mode = 'raw'):
- Higher performance sending of vector data.
- Permits sending of NULL, in which case an empty vector of the corresponding mode is received.
- Character vectors containing empty characters in the middle are now received correctly.
- For character vectors, respects original encoding and no longer performs automatic conversion to UTF8.
- Base64 and SHA hash functions now always use big-endian representation for serialization (where this is performed) to ensure consistency across all systems (fixes #14, a regression in nanonext 0.9.2).
- Package installation now succeeds in certain environments where 'cmake' failed to make 'libmbedtls' detectable after building (thanks @kendonB #13).
- Source bundles for 'libmbedtls' and 'libnng' slimmed down for smaller package and installed sizes.
- Configures bundled 'libmbedtls' v3.4.0 for higher performance.
- Supported 'libmbedtls' version increased to >= 2.5.
CRAN release 0.9.2
nanonext 0.9.2
This version contains performance enhancements which have resulted in potentially breaking changes; please review carefully and only update when ready.
New Features
base64dec()
argument 'convert' now accepts NA as an input, which unserializes back to the original object.
Updates
- The argument 'keep.raw' for all receive functions is deprecated. This is as raw vectors are no longer created as part of unserialisation or data conversion.
- Higher performance send and receive of serialized R objects.
- For receive functions, attempting to unserialise a non-serialised message will now error with 'unknown input format' rather than fall back to a raw message vector.
ncurl()
etc. gain higher performance raw to character conversion, resulting in the following changes:- Attempting to convert non-text data with embedded nuls will now error instead of silently returning NULL.
- For efficiency, when 'convert' = TRUE, a raw vector is no longer stored at
$raw
.
- Higher performance cryptographic hash and base64 conversion functions.
- Attributes are now taken into account for scalar strings and raw vectors to ensure unique hashes.
- Experimental threaded function
timed_signal()
removed. - Requires R >= 3.5 to ensure R serialization version 3.
CRAN release 0.9.1
nanonext 0.9.1
New Features
- Enables secure TLS transports
tls+tcp://
andwss://
for scalability protocols.listen()
anddial()
gain the argument 'tls' for supplying a TLS configuration objectwrite_cert()
generates 4096 bit RSA keys and self-signed X.509 certificates for use withtls_config()
.
weakref()
,weakref_key()
andweakref_value()
implement an interface to R's weak reference system. These may be used for synchronising the lifetimes of objects with reference objects such as Sockets or Aios, or creating read-only objects accessible by the weakref value alone.strcat()
provides a simple, fast utility to concatenate two strings.
Updates
tls_config()
now accepts a relative path if filenames are supplied for the 'client' or 'server' arguments.- 'tlsConfig' objects no longer have a 'source' attribute.
- Fix cases where
base64enc()
failed for objects exceeding a certain size. stream()
has been updated internally for additional robustness.- Updates bundled 'libmbedtls' v3.4.0 source configuration for threading support.
- Updates bundled 'libnng' to v1.6.0 alpha (c5e9d8a) again, having resolved previous issues.
CRAN release 0.9.0
nanonext 0.9.0
The package is now compatible (again) with currently released 'libnng' versions. It will attempt to use system 'libnng' versions >= 1.5 where detected, and only compile the bundled library where necessary.
New Features
- Implements
tls_config()
to create re-usable TLS configurations from certificate / key files (or provided directly as text).
Updates
- 'pem' argument of
ncurl()
,ncurl_session()
andstream()
retired in favour of 'tls' which takes a TLS Configuration object created bytls_config()
rather than a PEM certificate directly. - Removes
nanonext_version()
in favour of the existingnng_version()
, along withutils::packageVersion()
if required, for greater flexibility. - Removes
...
argument forcontext()
- retained for compatibility with the 'verify' argument, which was removed in the previous release. - Package widens compatibility to support system 'libnng' versions >= 1.5.0.
- Bundled 'libnng' source rolled back to v1.6.0 pre-release (8e1836f) for stability.
CRAN release 0.8.3
nanonext 0.8.3
New Features
- Implements
cv_signal()
andtimed_signal()
for signalling a condition variable, the latter after a specified time (from a newly-created thread). - Implements
.context()
, a performance alternative tocontext()
that does not create the full object. - Adds utility
nanonext_version()
for providing the package version, NNG and mbed TLS library versions in a single string. ncurl()
gains a 'timeout' argument.
Updates
- Removes 'verify' argument of
context()
(changed to '...' for compatibility) asrequest()
andrequest_signal()
have been rendered safe internally for use with timeouts. - The name of the single argument to
msleep()
has been changed to 'time' from 'msec'. - Functions
pipe_notify()
,lock()
andunlock()
now error if unsuccessful rather than returning with a warning. - For compiling bundled 'libmbedtls' and 'libnng' libraries from source, R's configured C compiler is now chosen over the system default where this is different.
- Bundled 'libnng' source updated to v1.6.0 alpha (c5e9d8a).
- Bundled 'libmbedtls' source updated to v3.4.0.
CRAN release 0.8.2
nanonext 0.8.2
New Features
lock()
andunlock()
implemented to prevent further pipe connections from being established at a socket, optionally tied to the value of a condition variable.
Updates
context()
gains the argument 'verify' with a default of TRUE. This adds additional protection to notably therequest()
andrequest_signal()
functions when using timeouts, as these require a connection to be present.- Sending and hashing of language objects and symbols is now possible after fixes to serialisation.
until()
now works as intended.- Removes recently-introduced
msg_pipe()
and'weakref<-'()
to maintain simplicity of user interface. - Internal performance enhancements.
CRAN release 0.8.1
nanonext 0.8.1
New Features
- Implements synchronisation primitives from the NNG library. Condition variables allow the R execution thread to wait until it is signalled by an incoming message or pipe event.
- adds core functions
cv()
,wait()
,until()
,cv_value()
, andcv_reset()
. - adds signalling receive functions
recv_aio_signal()
andrequest_signal()
. pipe_notify()
signals up to 2 condition variables whenever pipes are added or removed at a socket.
- adds core functions
- Adds
msg_pipe()
to return the pipe connection associated with a 'recvAio' message. - Exposes the
sha1()
cryptographic hash and HMAC generation function from the 'Mbed TLS' library (for secure applications, use one of the SHA-2 algorithms instead). - Utility function
'weakref<-'()
exposesR_MakeWeakRef
from R's C API. Useful for keeping objects alive for as long as required by a dependent object.
Updates
ncurl_session()
gains a 'timeout' argument, and returns an 'errorValue' with warning upon error.listen()
anddial()
gain the new logical argument 'error' to govern the function behaviour upon error.- Internal performance enhancements.
CRAN release 0.8.0
nanonext 0.8.0
New Features
- Implements
stat()
, an interface to the NNG statistics framework. Can be used to return the number of currently connected pipes for a socket, connection attempts for a listener/dialer etc. - Implements
parse_url()
, which parses a URL as per NNG. Provides a fast and standardised method for obtaining parts of a URL string.
Updates
Please review the following potentially breaking changes, and only update when ready:
- Using
socket()
specifying either 'dial' or 'listen', a failure to either dial or listen (due to an invalid URL for example) will now error rather than return a socket with a warning. This is safer behaviour that should make it easier to detect bugs in user code. opt()
and'opt<-'()
have been implemented as more ergonomic options getter and setter functions to replacegetopt()
andsetopt()
. These will error if the option does not exist / input value is invalid etc.subscribe()
,unsubscribe()
andsurvey_time()
now return the Socket or Context invisibly rather than an exit code, and will error upon invalid input etc.survey_time()
argument name is now 'value', with a default of 1000L.- nano Object methods
$opt
,$listener_opt
, and$dialer_opt
re-implemented to either get or set values depending on whether the 'value' parameter has been supplied.
Other changes:
- Bundled 'libnng' source updated to v1.6.0 pre-release (8e1836f).
- Supported R version amended to >= 2.12, when person() adopted the current format used for package description.
- Internal performance enhancements.
CRAN release 0.7.3
nanonext 0.7.3
New Features
- Implements
ncurl_session()
andtransact()
providing high-performance, re-usable http(s) connections.
Updates
- For dialers, the 'autostart' argument to
dial()
,socket()
andnano()
now accepts NA for starting the dialer synchronously - this is less resilient if a connection is not immediately possible, but avoids subtle errors from attempting to use the socket before an asynchronous dial has completed. - Closing a stream now renders it inactive safely, without the need to strip all attributes on the object (as was the case previously).
messenger()
is faster to connect and exits gracefully in case of a connection error.- Removes defunct function
nano_init()
. - Bundled 'libnng' source updated to v1.6.0 pre-release (539e559).
- Fixes CRAN 'additional issue' (clang-UBSAN).
CRAN release 0.7.2
nanonext 0.7.2
Updates
- For raw to character hash conversion, uses snprintf instead of sprintf for CRAN compliance.