Skip to content

Releases: shikokuchuo/nanonext

CRAN release 0.4.0

10 Apr 21:47
ccb6c4a
Compare
Choose a tag to compare

nanonext 0.4.0

New Features

  • New stream() interface exposes low-level byte stream functionality in the NNG library, intended for communicating with non-NNG endpoints, including but not limited to websocket servers.
  • ncurl() adds an 'async' option to perform HTTP requests asynchronously, returning immediately with a 'recvAio'. Adds explicit arguments for HTTP method, headers (which takes a named list or character vector) and request data, as well as to specify if conversion from raw bytes is required.
  • New messenger() function implements a multi-threaded console-based messaging system using NNG's scalability protocols (currently as proof of concept).
  • New nano_init() function intended to be called immediately after package load to set global options.

Updates

  • 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().
  • Returned NNG error codes are now all classed as 'errorValue' across the package.
  • 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.
  • Revised 'block' argument for send() and recv() now allows an integer value for setting a timeout.
  • 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.
  • 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.
  • Internal performance optimisations.

CRAN release 0.3.0

10 Mar 12:17
c005e8c
Compare
Choose a tag to compare

nanonext 0.3.0

New Features

  • Aio values $result, $data and $raw now resolve automatically without requiring call_aio(). Access directly and an 'unresolved' logical NA value will be returned if the Aio operation is yet to complete.
  • unresolved() added as an auxiliary function to query whether an Aio is unresolved, for use in control flow statements.
  • Integer error values generated by receive functions are now classed 'errorValue'. is_error_value() helper function included.
  • is_nul_byte() added as a helper function for request/reply setups.
  • survey_time() added as a convenience function for surveyor/respondent patterns.
  • logging() function to specify a global package logging level - 'error' or 'info'. Automatically checks the environment variable 'NANONEXT_LOG' on package load and then each time logging(level = "check") is called.
  • ncurl() adds a '...' argument. Support for HTTP methods other than GET.

Updates

  • listen() and dial() now return (invisible) zero rather than NULL upon success for consistency with other functions.
  • Options documentation entry renamed to opts to avoid clash with base R 'options'.
  • Common format for NNG errors and informational events now starts with a timestamp for easier logging.
  • Allows setting the environment variable 'NANONEXT_ARM' prior to package installation
    • Fixes installation issues on certain ARM architectures
  • Package installation using a system 'libnng' now automatically detects 'libmbedtls', removing the need to manually set 'NANONEXT_TLS' in this case.
  • More streamlined NNG build process eliminating unused options.
  • Removes experimental nng_timer() utility as a non-essential function.
  • Deprecated functions 'send_vec' and 'recv_vec' removed.

CRAN release 0.2.0

10 Feb 10:02
f47fd3d
Compare
Choose a tag to compare

New Features

  • Implements full async I/O capabilities
    • send_aio() and recv_aio() now return Aio objects, for which the results may be called using call_aio().
  • New request() and reply() functions implement the full logic of an RPC client/server, allowing processes to run concurrently on the client and server.
    • Designed to be run in separate processes, the reply server will await data and apply a function before returning a result.
    • The request client performs an async request to the server and returns immediately with an Aio.
  • New ncurl() minimalistic http(s) client.
  • New nng_timer() utility as a demonstration of NNG's multithreading capabilities.
  • Allows setting the environment variable 'NANONEXT_TLS' prior to package installation
    • Enables TLS where the system NNG library has been built with TLS support (using Mbed TLS).

Updates

  • Dialer/listener starts and close operations no longer print a message to stderr when successful for less verbosity by default.
  • All send and receive functions, e.g. send()/recv(), gain a revised 'mode' argument.
    • This now permits R serialization as an option, consolidating the functionality of the '_vec' series of functions.
  • Functions 'send_vec' and 'recv_vec' are deprecated and will be removed in a future release.
  • Functions 'ctx_send' and 'ctx_recv' have been renamed send_ctx() and recv_ctx() for consistency.
  • The $socket_close() method of nano objects has been renamed $close() to better align with the functional API.

CRAN release 0.1.0

25 Jan 09:16
f139249
Compare
Choose a tag to compare
  • Initial release to CRAN, rOpenSci R-universe and Github.