Skip to content

Releases: shikokuchuo/nanonext

CRAN release 0.7.3

22 Jan 17:30
2fae382
Compare
Choose a tag to compare

nanonext 0.7.3

New Features

  • Implements ncurl_session() and transact() providing high-performance, re-usable http(s) connections.

Updates

  • For dialers, the 'autostart' argument to dial(), socket() and nano() 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

12 Dec 11:06
c9458a3
Compare
Choose a tag to compare

nanonext 0.7.2

Updates

  • For raw to character hash conversion, uses snprintf instead of sprintf for CRAN compliance.

v0.7.1

16 Nov 16:35
d51473e
Compare
Choose a tag to compare

nanonext 0.7.1

New Features

  • Implements getopt(), the counterpart to setopt() for retrieving the value of options on objects.

Updates

  • The setopt() interface is simplified, with the type now inferred from the value supplied.
  • ncurl() now returns redirect addresses as the response header 'Location'. This is so that HTTP data can also be returned at $data where this is provided.
  • Eliminates CRAN 'additional issue' (clang/gcc-UBSAN).
  • Internal performance optimisations.

CRAN release 0.7.0

07 Nov 11:56
5f5e4bb
Compare
Choose a tag to compare

nanonext 0.7.0

nanonext 0.7 implements API optimisations after recent enhancements; the API is again intended to remain stable after these changes

New Features

  • status_code() utility returns a translation of HTTP response status codes.

Updates

Please review the following potentially breaking changes, and only update when ready:

  • The API has been re-engineered to ensure stability of return types:
    • socket(), context() and stream() will now error rather than return an 'errorValue'. The error value is included in the error message.
    • send_aio() and recv_aio() now always return an integer 'errorValue' at $result and $data respectively.
    • recv() and recv_aio() now return an integer 'errorValue' at each of $raw and $data when 'keep.raw' is set to TRUE.
    • ncurl() now returns an integer 'errorValue' at each of $status, $headers, $raw and $data for both sync and async. Where redirects are not followed, the address is now returned as a character string at $data.
  • For functions that send and receive messages i.e. send(), send_aio(), recv(), recv_aio() and ncurl(), 'errorValues' are now returned silently without an accompanying warning. Use is_error_value() to explicitly check for errors.
  • nano_init() is deprecated due to the above change in behaviour.
  • send() no longer has a '...' argument. This has had no effect since 0.6.0, but will now error if additional arguments are provided (please check and remove previous uses of the argument 'echo'). Also no longer returns invisibly for consistency with recv().
  • listen() and dial() now only take a socket as argument; for nano objects, the $listen() and $dial() methods must be used instead.
  • nano() now creates a nano object with method $context_open() for applicable protocols. Opening a context will attach a context at $context and a $context_close() method. When a context is active, all object methods apply to the context instead of the socket. Method $socket_setopt() renamed to $setopt() as it can be used on the socket or active context as applicable.
  • Non-logical values supplied to logical arguments will now error: this is documented for each function where this is applicable.

Other changes:

  • Integer send()/recv() arguments for 'mode' and setopt() arguments for 'type' 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.
  • Fixes bug introduced in 0.6.0 where Aios returning 'errorValues' are not cached with the class, returning only integer values when accessed subsequently.
  • Fixes potential crash when base64dec() encounters invalid input data. Error messages have been revised to be more accurate.
  • Fixes the $ method for 'recvAio' objects for when the object has been stopped using stop_aio().
  • Using the $listen() or $dial() methods of a nano object specifying 'autostart = FALSE' now attaches the $listener_start() or $dialer_start() method for the most recently added listener/dialer.
  • device() no longer prompts for confirmation in interactive environments - as device creation is only successful when binding 2 raw mode sockets, there is little scope for accidental use.
  • Print method for 'errorValue' now also provides the human translation of the error code.
  • Bundled 'libnng' source updated to v1.6.0 pre-release (5385b78).
  • Internal performance enhancements.

CRAN release 0.6.0

10 Oct 05:45
5eabd9e
Compare
Choose a tag to compare

nanonext 0.6.0

The nanonext 0.6 series incorporates significant advances in performance and stability over previous releases

New Features

  • Implements base64enc() and base64dec() base64 encoding and decoding using the 'Mbed TLS' library.
  • sha224(), sha256(), sha384() and sha512() functions gain an argument 'convert' to control whether to return a raw vector or character string.
  • ncurl() gains the argument 'follow' (default FALSE) to control whether redirects are automatically followed.

Updates

Please review the following potentially breaking changes, and only update when ready:

  • send() now returns an integer exit code in all cases. The 'echo' argument has been replaced by '...', and specifying 'echo' no longer has any effect.
  • recv(), recv_aio() and request() now default to 'keep.raw' = FALSE to return only the sent object.
  • ncurl() argument 'request' renamed to 'response' for specifying response headers to return (to avoid confusion); new argument 'follow' (placed between 'convert' and 'method') controls whether redirects are followed, and there is no longer a user prompt in interactive environments.
  • sha224(), sha256(), sha384() and sha512() functions no longer return 'nanoHash' objects, but a raw vector or character string depending on the new argument 'convert'.

Other changes:

  • socket() and nano() now accept non-missing NULL 'listen' and 'dial' arguments, allowing easier programmatic use.
  • Functions send(), recv(), send_aio(), recv_aio(), setopt(), subscribe(), unsubscribe() and survey_time() are no longer S3 generics for enhanced performance.
  • messenger() uses longer SHA-512 hash for authentication; fixes errors creating a connnection not being shown.
  • The source code of 'libnng' v1.6.0 pre-release (722bf46) and 'libmbedtls' v3.2.1 now comes bundled rather than downloaded - this is much more efficient as unused portions have been stripped out.
  • Detects and uses system installations of 'libnng' >= 1.6.0 pre-release 722bf46 and 'libmbedtls' >= 2 where available, only compiling from source when required.
  • R >= 4.2 on Windows now performs source compilation of the bundled 'libnng' and 'libmbedtls' using the rtools42 toolchain. Installation falls back to pre-compiled libraries for older R releases.
  • Supported R version amended to >= 2.5, when the current new.env() interface was implemented.
  • Internal performance enhancements.

CRAN release 0.5.5

05 Sep 06:47
034aa04
Compare
Choose a tag to compare

nanonext 0.5.5

Updates

  • Installation succeeds under Linux where library path uses 'lib64' instead of 'lib', and fails gracefully if 'cmake' is not found.

CRAN release 0.5.4

02 Sep 09:28
cca6fbb
Compare
Choose a tag to compare

nanonext 0.5.4

New Features

  • Implements sha224(), sha256(), sha384() and sha512() series of fast, optimised cryptographic hash and HMAC generation functions using the 'Mbed TLS' library.
  • ncurl() and stream() gain the argmument 'pem' for optionally specifying a certificate authority certificate chain PEM file for authenticating secure sites.
  • ncurl() gains the argument 'request' for specifying response headers to return.
  • ncurl() now returns additional $status (response status code) and $headers (response headers) fields.
  • messenger() gains the argument 'auth' for authenticating communications based on a pre-shared key.
  • random() gains the argument 'n' for generating a vector of random numbers.

Updates

  • 'libmbedtls' is now built from source upon install so the package always has TLS support and uses the latest v3.2.1 release. Windows binaries also updated to include TLS support.
  • nng_version() now returns the 'Mbed TLS' library version number.
  • device() gains a confirmation prompt when running interactively for more safety.
  • Fixes issue with ncurl() that caused a 26 cryptography error with certain secure sites using SNI.

CRAN release 0.5.3

08 Aug 09:35
c0a68f0
Compare
Choose a tag to compare

nanonext 0.5.3

Updates

  • Configure script provides more information by default.
  • Allows integer send/recv 'mode' arguments (note: this is an undocumented performance feature with no future guarantees).
  • Aio 'timeout' arguments now default to NULL for applying the socket default, although non-breaking as -2L will also work.
  • msleep() made safe (does not block) in case of non-numeric input.
  • Internal performance optimisations.

CRAN release 0.5.2

07 Jul 07:07
78702b7
Compare
Choose a tag to compare

nanonext 0.5.2

New Features

  • Adds mclock(), msleep() and random() utilities exposing the library functions for timing and cryptographic RNG respectively.
  • socket() gains the ability to open 'raw' mode sockets. Please note: this is not for general use - do not set this argument unless you have a specific need, such as for use with device() (refer to NNG documentation).
  • Implements device() which creates a socket forwarder or proxy. Warning: use this in a separate process as this function blocks with no ability to interrupt.

Updates

  • Internal performance optimisations.

CRAN release 0.5.1

10 Jun 09:19
7509314
Compare
Choose a tag to compare

nanonext 0.5.1

Updates

  • Upgrades NNG library to 1.6.0 pre-release (locked to version 722bf46). This version incorporates a feature simplifying the aio implementation in nanonext.
  • Configure script updated to always download and build 'libnng' from source (except on Windows where pre-built libraries are downloaded). The script still attempts to detect a system 'libmbedtls' library to link against.
  • Environment variable 'NANONEXT_SYS' introduced to permit use of a system 'libnng' install in /usr/local. Note that this is a manual setting allowing for custom NNG builds, and requires a version of NNG at least as recent as 722bf46.
  • Fixes a bug involving the unresolvedValue returned by Aios (thanks @lionel- #3).