diff --git a/DESCRIPTION b/DESCRIPTION index ef3769021..aa1eea281 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: nanonext Type: Package Title: NNG (Nanomsg Next Gen) Lightweight Messaging Library -Version: 1.4.0.9001 +Version: 1.4.0.9002 Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is a socket library implementing 'Scalability Protocols', a reliable, high-performance standard for common communications patterns including diff --git a/NEWS.md b/NEWS.md index f550b731b..7ac1ca4eb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,8 +1,7 @@ -# nanonext 1.4.0.9001 (development) +# nanonext 1.4.0.9002 (development) #### Updates -* `reap()` now accepts an integer pipe ID to close the associated pipe. * Removes partial matching when using `$`, `[[` or `[` on an object inheriting from class 'nano'. # nanonext 1.4.0 diff --git a/R/socket.R b/R/socket.R index 22363d04c..a8a405ea7 100644 --- a/R/socket.R +++ b/R/socket.R @@ -161,14 +161,14 @@ close.nanoSocket <- function(con, ...) invisible(.Call(rnng_close, con)) #' Reap #' -#' An alternative to \code{close} for Sockets, Contexts, Listeners, Dialers and -#' Pipes avoiding S3 method dispatch. +#' An alternative to \code{close} for Sockets, Contexts, Listeners, and Dialers +#' avoiding S3 method dispatch. #' #' May be used on unclassed external pointers e.g. those created by #' \code{\link{.context}}. Returns silently and does not warn or error, nor does #' it update the state of object attributes. #' -#' @param con a Socket, Context, Listener, Dialer or integer pipe ID. +#' @param con a Socket, Context, Listener or Dialer. #' #' @return An integer exit code (zero on success). #' diff --git a/man/reap.Rd b/man/reap.Rd index 7aa9e3971..828b53ce9 100644 --- a/man/reap.Rd +++ b/man/reap.Rd @@ -7,14 +7,14 @@ reap(con) } \arguments{ -\item{con}{a Socket, Context, Listener, Dialer or integer pipe ID.} +\item{con}{a Socket, Context, Listener or Dialer.} } \value{ An integer exit code (zero on success). } \description{ -An alternative to \code{close} for Sockets, Contexts, Listeners, Dialers and -Pipes avoiding S3 method dispatch. +An alternative to \code{close} for Sockets, Contexts, Listeners, and Dialers +avoiding S3 method dispatch. } \details{ May be used on unclassed external pointers e.g. those created by diff --git a/src/proto.c b/src/proto.c index 8f3a0fed9..313d579ff 100644 --- a/src/proto.c +++ b/src/proto.c @@ -195,11 +195,6 @@ SEXP rnng_reap(SEXP con) { } else if (ptrtag == nano_DialerSymbol) { xc = nng_dialer_close(*(nng_dialer *) NANO_PTR(con)); - } else if (TYPEOF(con) == INTSXP) { - nng_pipe p; - p.id = (uint32_t) NANO_INTEGER(con); - xc = nng_pipe_close(p); - } else { xc = 3; } diff --git a/tests/tests.R b/tests/tests.R index 8b840f753..87a3a85b1 100644 --- a/tests/tests.R +++ b/tests/tests.R @@ -384,8 +384,6 @@ test_zero(send_aio(poly, "one", timeout = 500, pipe = pipes[1L])[]) test_zero(send(poly, "two", block = 500, pipe = pipes[2L])) test_type("character", recv(poly1, block = 500)) test_type("character", recv(poly2, block = 500)) -test_zero(reap(pipes[1L])) -test_zero(reap(pipes[2L])) test_zero(reap(poly2)) test_zero(reap(poly1)) test_true(wait(cv))