Skip to content

Commit b0e54e8

Browse files
committed
CRAN release 0.8.0
1 parent dc8f907 commit b0e54e8

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: nanonext
22
Type: Package
33
Title: NNG (Nanomsg Next Gen) Lightweight Messaging Library
4-
Version: 0.7.3.9005
4+
Version: 0.8.0
55
Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is
66
a socket library providing high-performance scalability protocols,
77
implementing a cross-platform standard for messaging and communications.

NEWS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# nanonext 0.7.3.9005 (development)
1+
# nanonext 0.8.0
22

33
#### New Features
44

@@ -12,7 +12,7 @@
1212
* 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.
1313
* `opt()` and `'opt<-'()` have been implemented as more ergonomic options getter and setter functions to replace `getopt()` and `setopt()`. These will error if the option does not exist / input value is invalid etc.
1414
* `subscribe()`, `unsubscribe()` and `survey_time()` now return the Socket or Context invisibly rather than an exit code, and will error upon invalid input etc.
15-
* `survey_time()` argument name is now 'value', with a new default value of 1000L.
15+
* `survey_time()` argument name is now 'value', with a default of 1000L.
1616
* 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.
1717

1818
*Other changes:*

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ aio
366366
#> < recvAio >
367367
#> - $data for message data
368368
aio$data |> str()
369-
#> num [1:100000000] -0.339 -0.404 0.341 -0.716 2.379 ...
369+
#> num [1:100000000] 0.824 0.427 -1.37 -1.831 0.401 ...
370370
```
371371

372372
As `call_aio()` is blocking and will wait for completion, an alternative
@@ -534,11 +534,11 @@ ncurl("https://httpbin.org/headers")
534534
#> [1] 7b 0a 20 20 22 68 65 61 64 65 72 73 22 3a 20 7b 0a 20 20 20 20 22 48 6f 73
535535
#> [26] 74 22 3a 20 22 68 74 74 70 62 69 6e 2e 6f 72 67 22 2c 20 0a 20 20 20 20 22
536536
#> [51] 58 2d 41 6d 7a 6e 2d 54 72 61 63 65 2d 49 64 22 3a 20 22 52 6f 6f 74 3d 31
537-
#> [76] 2d 36 33 66 62 34 37 66 64 2d 32 62 32 63 37 39 61 38 30 63 38 65 62 62 31
538-
#> [101] 39 33 64 62 30 63 33 32 33 22 0a 20 20 7d 0a 7d 0a
537+
#> [76] 2d 36 34 30 31 61 36 33 63 2d 32 38 38 62 62 33 66 32 35 38 35 61 39 65 31
538+
#> [101] 39 36 66 65 39 31 34 33 34 22 0a 20 20 7d 0a 7d 0a
539539
#>
540540
#> $data
541-
#> [1] "{\n \"headers\": {\n \"Host\": \"httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-63fb47fd-2b2c79a80c8ebb193db0c323\"\n }\n}\n"
541+
#> [1] "{\n \"headers\": {\n \"Host\": \"httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-6401a63c-288bb3f2585a9e196fe91434\"\n }\n}\n"
542542
```
543543

544544
For advanced use, supports additional HTTP methods such as POST or PUT.
@@ -559,13 +559,13 @@ res
559559

560560
call_aio(res)$headers
561561
#> $Date
562-
#> [1] "Sun, 26 Feb 2023 11:52:30 GMT"
562+
#> [1] "Fri, 03 Mar 2023 07:48:12 GMT"
563563
#>
564564
#> $Server
565565
#> [1] "gunicorn/19.9.0"
566566

567567
res$data
568-
#> [1] "{\n \"args\": {}, \n \"data\": \"{\\\"key\\\": \\\"value\\\"}\", \n \"files\": {}, \n \"form\": {}, \n \"headers\": {\n \"Authorization\": \"Bearer APIKEY\", \n \"Content-Length\": \"16\", \n \"Content-Type\": \"application/json\", \n \"Host\": \"httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-63fb47fd-0e4c0ec16aabbd2c781ec7bc\"\n }, \n \"json\": {\n \"key\": \"value\"\n }, \n \"origin\": \"131.111.5.14\", \n \"url\": \"http://httpbin.org/post\"\n}\n"
568+
#> [1] "{\n \"args\": {}, \n \"data\": \"{\\\"key\\\": \\\"value\\\"}\", \n \"files\": {}, \n \"form\": {}, \n \"headers\": {\n \"Authorization\": \"Bearer APIKEY\", \n \"Content-Length\": \"16\", \n \"Content-Type\": \"application/json\", \n \"Host\": \"httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-6401a63c-413dd500166f01060651af22\"\n }, \n \"json\": {\n \"key\": \"value\"\n }, \n \"origin\": \"131.111.5.14\", \n \"url\": \"http://httpbin.org/post\"\n}\n"
569569
```
570570

571571
In this respect, it may be used as a performant and lightweight method
@@ -591,7 +591,7 @@ transact(sess)
591591
#>
592592
#> $headers
593593
#> $headers$date
594-
#> [1] "Sun, 26 Feb 2023 11:52:30 GMT"
594+
#> [1] "Fri, 03 Mar 2023 07:48:13 GMT"
595595
#>
596596
#>
597597
#> $raw
@@ -601,15 +601,15 @@ transact(sess)
601601
#> [76] 22 43 6f 6e 74 65 6e 74 2d 54 79 70 65 22 3a 20 22 61 70 70 6c 69 63 61 74
602602
#> [101] 69 6f 6e 2f 6a 73 6f 6e 22 2c 20 0a 20 20 20 20 22 48 6f 73 74 22 3a 20 22
603603
#> [126] 68 74 74 70 62 69 6e 2e 6f 72 67 22 2c 20 0a 20 20 20 20 22 58 2d 41 6d 7a
604-
#> [151] 6e 2d 54 72 61 63 65 2d 49 64 22 3a 20 22 52 6f 6f 74 3d 31 2d 36 33 66 62
605-
#> [176] 34 37 66 65 2d 34 63 32 33 63 39 30 62 32 33 34 31 36 37 38 66 37 36 30 32
606-
#> [201] 38 31 39 34 22 0a 20 20 7d 2c 20 0a 20 20 22 6f 72 69 67 69 6e 22 3a 20 22
607-
#> [226] 38 32 2e 31 36 33 2e 31 39 37 2e 35 22 2c 20 0a 20 20 22 75 72 6c 22 3a 20
608-
#> [251] 22 68 74 74 70 73 3a 2f 2f 68 74 74 70 62 69 6e 2e 6f 72 67 2f 67 65 74 22
609-
#> [276] 0a 7d 0a
604+
#> [151] 6e 2d 54 72 61 63 65 2d 49 64 22 3a 20 22 52 6f 6f 74 3d 31 2d 36 34 30 31
605+
#> [176] 61 36 33 64 2d 33 66 64 33 38 66 63 32 37 34 31 35 33 38 31 64 37 36 31 39
606+
#> [201] 34 61 65 35 22 0a 20 20 7d 2c 20 0a 20 20 22 6f 72 69 67 69 6e 22 3a 20 22
607+
#> [226] 31 38 35 2e 32 32 35 2e 34 35 2e 34 39 22 2c 20 0a 20 20 22 75 72 6c 22 3a
608+
#> [251] 20 22 68 74 74 70 73 3a 2f 2f 68 74 74 70 62 69 6e 2e 6f 72 67 2f 67 65 74
609+
#> [276] 22 0a 7d 0a
610610
#>
611611
#> $data
612-
#> [1] "{\n \"args\": {}, \n \"headers\": {\n \"Authorization\": \"Bearer APIKEY\", \n \"Content-Type\": \"application/json\", \n \"Host\": \"httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-63fb47fe-4c23c90b2341678f76028194\"\n }, \n \"origin\": \"131.111.5.14\", \n \"url\": \"https://httpbin.org/get\"\n}\n"
612+
#> [1] "{\n \"args\": {}, \n \"headers\": {\n \"Authorization\": \"Bearer APIKEY\", \n \"Content-Type\": \"application/json\", \n \"Host\": \"httpbin.org\", \n \"X-Amzn-Trace-Id\": \"Root=1-6401a63d-3fd38fc27415381d76194ae5\"\n }, \n \"origin\": \"131.111.5.14\", \n \"url\": \"https://httpbin.org/get\"\n}\n"
613613
```
614614

615615
[« Back to ToC](#table-of-contents)

tests/tests.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,10 @@ if (length(s)) {
335335
nanotest(is.integer(send(s, 12.56, mode = "raw", block = 500L)))
336336
nanotest(is_aio(sr <- recv_aio(s, mode = "double", timeout = 500L)))
337337
nanotestnn(call_aio(sr)[["data"]])
338+
nanotest(is.character(opt(s, "ws:request-headers")))
338339
nanotesterr(recv(s, mode = "none", block = FALSE), "mode")
339340
nanotesterr(recv(s, mode = "c", block = FALSE), "mode")
341+
nanotesterr(opt(s, "none"), "supported")
340342
nanotest(is.integer(close(s)))
341343
}
342344

0 commit comments

Comments
 (0)