Skip to content

Commit 5dc2837

Browse files
committed
complete docs reflow
1 parent 60c0ecf commit 5dc2837

31 files changed

+847
-879
lines changed

R/docs.R

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#'
2121
#' @description Protocols implemented by \pkg{nanonext}.
2222
#'
23-
#' For an authoritative guide please refer to the online documentation for
24-
#' the NNG library at \url{https://nng.nanomsg.org/man/}.
23+
#' For an authoritative guide please refer to the online documentation for the
24+
#' NNG library at \url{https://nng.nanomsg.org/man/}.
2525
#'
2626
#' @section Bus (mesh networks):
2727
#'
@@ -140,9 +140,8 @@ NULL
140140
#'
141141
#' @description Transports supported by \pkg{nanonext}.
142142
#'
143-
#' For an authoritative guide please refer to the online documentation for
144-
#' the NNG library at \url{https://nng.nanomsg.org/man/}.
145-
#'
143+
#' For an authoritative guide please refer to the online documentation for the
144+
#' NNG library at \url{https://nng.nanomsg.org/man/}.
146145
#'
147146
#' @section Inproc:
148147
#'

R/listdial.R

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -20,53 +20,53 @@
2020
#'
2121
#' Creates a new Dialer and binds it to a Socket.
2222
#'
23+
#' To view all Dialers bound to a socket use \code{$dialer} on the socket, which
24+
#' returns a list of Dialer objects. To access any individual Dialer (e.g. to
25+
#' set options on it), index into the list e.g. \code{$dialer[[1]]} to return
26+
#' the first Dialer.
27+
#'
28+
#' A Dialer is an external pointer to a dialer object, which creates a single
29+
#' outgoing connection at a time. If the connection is broken, or fails, the
30+
#' dialer object will automatically attempt to reconnect, and will keep doing so
31+
#' until the dialer or socket is destroyed.
32+
#'
2333
#' @param socket a Socket.
2434
#' @param url [default 'inproc://nanonext'] a URL to dial, specifying the
25-
#' transport and address as a character string e.g. 'inproc://anyvalue' or
26-
#' 'tcp://127.0.0.1:5555' (see \link{transports}).
35+
#' transport and address as a character string e.g. 'inproc://anyvalue' or
36+
#' 'tcp://127.0.0.1:5555' (see \link{transports}).
2737
#' @param tls [default NULL] for secure tls+tcp:// or wss:// connections only,
28-
#' provide a TLS configuration object created by \code{\link{tls_config}}.
38+
#' provide a TLS configuration object created by \code{\link{tls_config}}.
2939
#' @param autostart [default TRUE] whether to start the dialer (by default
30-
#' asynchronously). Set to NA to start synchronously - this is less
31-
#' resilient if a connection is not immediately possible, but avoids subtle
32-
#' errors from attempting to use the socket before an asynchronous dial has
33-
#' completed. Set to FALSE if setting configuration options on the dialer as
34-
#' it is not generally possible to change these once started.
40+
#' asynchronously). Set to NA to start synchronously - this is less resilient
41+
#' if a connection is not immediately possible, but avoids subtle errors from
42+
#' attempting to use the socket before an asynchronous dial has completed. Set
43+
#' to FALSE if setting configuration options on the dialer as it is not
44+
#' generally possible to change these once started.
3545
#' @param error [default FALSE] behaviour on error: if FALSE, returns an integer
36-
#' exit code accompanied by a warning, or, if TRUE, generates an error and
37-
#' halts execution.
46+
#' exit code accompanied by a warning, or, if TRUE, generates an error and
47+
#' halts execution.
3848
#'
3949
#' @return Invisibly, an integer exit code (zero on success). A new Dialer
40-
#' (object of class \sQuote{nanoDialer} and \sQuote{nano}) is created and
41-
#' bound to the Socket if successful.
42-
#'
43-
#' @details To view all Dialers bound to a socket use \code{$dialer} on the
44-
#' socket, which returns a list of Dialer objects. To access any individual
45-
#' Dialer (e.g. to set options on it), index into the list e.g.
46-
#' \code{$dialer[[1]]} to return the first Dialer.
47-
#'
48-
#' A Dialer is an external pointer to a dialer object, which creates a
49-
#' single outgoing connection at a time. If the connection is broken, or
50-
#' fails, the dialer object will automatically attempt to reconnect, and
51-
#' will keep doing so until the dialer or socket is destroyed.
50+
#' (object of class \sQuote{nanoDialer} and \sQuote{nano}) is created and
51+
#' bound to the Socket if successful.
5252
#'
5353
#' @section Further details:
5454
#'
55-
#' Dialers and Listeners are always associated with a single socket. A
56-
#' given socket may have multiple Listeners and/or multiple Dialers.
55+
#' Dialers and Listeners are always associated with a single socket. A given
56+
#' socket may have multiple Listeners and/or multiple Dialers.
5757
#'
58-
#' The client/server relationship described by dialer/listener is completely
59-
#' orthogonal to any similar relationship in the protocols. For example, a
60-
#' rep socket may use a dialer to connect to a listener on an req socket.
61-
#' This orthogonality can lead to innovative solutions to otherwise
62-
#' challenging communications problems.
58+
#' The client/server relationship described by dialer/listener is completely
59+
#' orthogonal to any similar relationship in the protocols. For example, a rep
60+
#' socket may use a dialer to connect to a listener on an req socket. This
61+
#' orthogonality can lead to innovative solutions to otherwise challenging
62+
#' communications problems.
6363
#'
64-
#' Any configuration options on the dialer/listener should be set by
65-
#' \code{\link{opt<-}} before starting the dialer/listener with
66-
#' \code{\link{start}}.
64+
#' Any configuration options on the dialer/listener should be set by
65+
#' \code{\link{opt<-}} before starting the dialer/listener with
66+
#' \code{\link{start}}.
6767
#'
68-
#' Dialers/Listeners may be destroyed by \code{\link{close}}. They are also
69-
#' closed when their associated socket is closed.
68+
#' Dialers/Listeners may be destroyed by \code{\link{close}}. They are also
69+
#' closed when their associated socket is closed.
7070
#'
7171
#' @examples
7272
#' socket <- socket("rep")
@@ -94,42 +94,42 @@ dial <- function(socket, url = "inproc://nanonext", tls = NULL, autostart = TRUE
9494
#'
9595
#' Creates a new Listener and binds it to a Socket.
9696
#'
97+
#' To view all Listeners bound to a socket use \code{$listener} on the socket,
98+
#' which returns a list of Listener objects. To access any individual Listener
99+
#' (e.g. to set options on it), index into the list e.g. \code{$listener[[1]]}
100+
#' to return the first Listener.
101+
#'
102+
#' A listener is an external pointer to a listener object, which accepts
103+
#' incoming connections. A given listener object may have many connections at
104+
#' the same time, much like an HTTP server can have many connections to multiple
105+
#' clients simultaneously.
106+
#'
97107
#' @inheritParams dial
98108
#' @param autostart [default TRUE] whether to start the listener. Set to FALSE
99-
#' if setting configuration options on the listener as it is not generally
100-
#' possible to change these once started.
109+
#' if setting configuration options on the listener as it is not generally
110+
#' possible to change these once started.
101111
#'
102112
#' @return Invisibly, an integer exit code (zero on success). A new Listener
103-
#' (object of class \sQuote{nanoListener} and \sQuote{nano}) is created and
104-
#' bound to the Socket if successful.
105-
#'
106-
#' @details To view all Listeners bound to a socket use \code{$listener} on the
107-
#' socket, which returns a list of Listener objects. To access any
108-
#' individual Listener (e.g. to set options on it), index into the list e.g.
109-
#' \code{$listener[[1]]} to return the first Listener.
110-
#'
111-
#' A listener is an external pointer to a listener object, which accepts
112-
#' incoming connections. A given listener object may have many connections
113-
#' at the same time, much like an HTTP server can have many connections to
114-
#' multiple clients simultaneously.
113+
#' (object of class \sQuote{nanoListener} and \sQuote{nano}) is created and
114+
#' bound to the Socket if successful.
115115
#'
116116
#' @section Further details:
117117
#'
118-
#' Dialers and Listeners are always associated with a single socket. A
119-
#' given socket may have multiple Listeners and/or multiple Dialers.
118+
#' Dialers and Listeners are always associated with a single socket. A given
119+
#' socket may have multiple Listeners and/or multiple Dialers.
120120
#'
121-
#' The client/server relationship described by dialer/listener is completely
122-
#' orthogonal to any similar relationship in the protocols. For example, a
123-
#' rep socket may use a dialer to connect to a listener on an req socket.
124-
#' This orthogonality can lead to innovative solutions to otherwise
125-
#' challenging communications problems.
121+
#' The client/server relationship described by dialer/listener is completely
122+
#' orthogonal to any similar relationship in the protocols. For example, a rep
123+
#' socket may use a dialer to connect to a listener on an req socket. This
124+
#' orthogonality can lead to innovative solutions to otherwise challenging
125+
#' communications problems.
126126
#'
127-
#' Any configuration options on the dialer/listener should be set by
128-
#' \code{\link{opt<-}} before starting the dialer/listener with
129-
#' \code{\link{start}}.
127+
#' Any configuration options on the dialer/listener should be set by
128+
#' \code{\link{opt<-}} before starting the dialer/listener with
129+
#' \code{\link{start}}.
130130
#'
131-
#' Dialers/Listeners may be destroyed by \code{\link{close}}. They are also
132-
#' closed when their associated socket is closed.
131+
#' Dialers/Listeners may be destroyed by \code{\link{close}}. They are also
132+
#' closed when their associated socket is closed.
133133
#'
134134
#' @examples
135135
#' socket <- socket("req")
@@ -159,11 +159,11 @@ listen <- function(socket, url = "inproc://nanonext", tls = NULL, autostart = TR
159159
#'
160160
#' @param x a Listener or Dialer.
161161
#' @param async [default TRUE] (applicable to Dialers only) logical flag whether
162-
#' the connection attempt, including any name resolution, is to be made
163-
#' asynchronously. This behaviour is more resilient, but also generally
164-
#' makes diagnosing failures somewhat more difficult. If FALSE, failure,
165-
#' such as if the connection is refused, will be returned immediately, and
166-
#' no further action will be taken.
162+
#' the connection attempt, including any name resolution, is to be made
163+
#' asynchronously. This behaviour is more resilient, but also generally makes
164+
#' diagnosing failures somewhat more difficult. If FALSE, failure, such as if
165+
#' the connection is refused, will be returned immediately, and no further
166+
#' action will be taken.
167167
#' @param ... not used.
168168
#'
169169
#' @return Invisibly, an integer exit code (zero on success).

0 commit comments

Comments
 (0)