Skip to content

Commit 954519d

Browse files
committed
Prof Brian Ripley comments
1 parent d599cef commit 954519d

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ License: GPL (>= 3)
1919
BugReports: https://github.com/shikokuchuo/nanonext/issues
2020
URL: https://shikokuchuo.net/nanonext/, https://github.com/shikokuchuo/nanonext/
2121
Encoding: UTF-8
22-
SystemRequirements: libnng or cmake
22+
SystemRequirements: either 'libnng' (deb: libnng-dev, rpm: nng-devel) or 'cmake' (to compile from source)
2323
Depends:
2424
R (>= 2.4)
2525
RoxygenNote: 7.1.2

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Install the latest release from CRAN:
3535
install.packages("nanonext")
3636
```
3737

38-
or the latest development version from rOpenSci R-universe:
38+
or the development version from rOpenSci R-universe:
3939

4040
```{r runiv, eval=FALSE}
4141
install.packages("nanonext", repos = "https://shikokuchuo.r-universe.dev")

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Install the latest release from CRAN:
3636
install.packages("nanonext")
3737
```
3838

39-
or the latest development version from rOpenSci R-universe:
39+
or the development version from rOpenSci R-universe:
4040

4141
``` r
4242
install.packages("nanonext", repos = "https://shikokuchuo.r-universe.dev")

tests/tests.R

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ invisible(inherits(n$socket, "nano") || stop())
99
invisible(is.integer(attr(n$socket, "id")) || stop())
1010
invisible(n$socket$state == "opened" || stop())
1111
invisible(n$socket$protocol == "req" || stop())
12-
invisible(n$socket_setopt("ms", "req:resend-time", 2000) == 0 || stop())
12+
invisible(n$socket_setopt("ms", "req:resend-time", 1000) == 0 || stop())
1313

1414
invisible(inherits(n$listener[[1]], "nanoListener") || stop())
1515
invisible(n$listener[[1]]$url == "inproc://nanonext" || stop())
@@ -21,25 +21,29 @@ invisible(n$listener[[1]]$state == "started" || stop())
2121
invisible(inherits(n1$dialer[[1]], "nanoDialer") || stop())
2222
invisible(n1$dialer[[1]]$url == "inproc://nanonext" || stop())
2323
invisible(n1$dialer[[1]]$state == "not started" || stop())
24-
invisible(n1$dialer_setopt("ms", "reconnect-time-min", 2000) == 0 || stop())
24+
invisible(n1$dialer_setopt("ms", "reconnect-time-min", 1000) == 0 || stop())
2525
invisible(suppressMessages(n1$dialer_start()) == 0L || stop())
2626
invisible(n1$dialer[[1]]$state == "started" || stop())
2727

28-
suppressMessages(n$send_aio(data.frame(), timeout = 1000))
28+
suppressMessages(n$send_aio(data.frame(), timeout = 500))
2929
invisible(suppressMessages(n1$recv()))
30-
suppressMessages(n1$send_vec_aio("test reply", timeout = 1000))
30+
suppressMessages(n1$send_vec_aio("test reply", timeout = 500))
3131
invisible(suppressMessages(n$recv_vec("character")))
3232

33-
n$dial(url = "inproc://two", autostart = FALSE)
33+
suppressMessages(n$dial(url = "inproc://two", autostart = TRUE))
3434
invisible(inherits(n$dialer[[1L]], "nanoDialer") || stop())
35+
suppressMessages(n$listen(url = "inproc://three"))
36+
invisible(inherits(n$listener[[2L]], "nanoListener") || stop())
3537

3638
ctx <- context(n$socket)
3739
invisible(inherits(ctx, "nanoContext") || stop())
3840
invisible(inherits(ctx, "nano") || stop())
3941
invisible(is.integer(ctx$id) || stop())
4042
invisible(ctx$state == "opened" || stop())
4143
invisible(ctx$protocol == "req" || stop())
42-
invisible(setopt(ctx, "ms", "send-timeout", 2000) == 0 || stop())
44+
invisible(setopt(ctx, "ms", "send-timeout", 1000) == 0 || stop())
45+
suppressMessages(ctx_send(ctx, data.frame(), timeout = 500))
46+
suppressMessages(ctx_send_vec(ctx, "context test", timeout = 500))
4347
invisible(suppressMessages(close(ctx)) == 0L || stop())
4448
invisible(ctx$state == "closed" || stop())
4549

@@ -54,8 +58,8 @@ invisible(suppressMessages(close(n$listener[[1]])) == 0L || stop())
5458
invisible(suppressMessages(close(n1$dialer[[1]])) == 0L || stop())
5559
invisible(suppressMessages(n$socket_close()) == 0L || stop())
5660
invisible(suppressMessages(n1$socket_close()) == 0L || stop())
57-
invisible(n$socket$state == "closed" || stop())
58-
invisible(n1$socket$state == "closed" || stop())
61+
invisible(n$socket[["state"]] == "closed" || stop())
62+
invisible(n1$socket[state] == "closed" || stop())
5963

6064
invisible(is.character(nng_version()) || stop())
6165
invisible(is.character(nng_error(0L)) || stop())

0 commit comments

Comments
 (0)