[Rd] Section 7.1 HML documentation (PR#8484)
hin-tak.leung at cimr.cam.ac.uk
Tue Jan 17 16:39:17 CET 2006
greg.kochanski at phon.ox.ac.uk wrote:
> Full_Name: Greg Kochanski
> Version: 2.2.0
> OS: Debian Linux i686
> Submission from: (NULL) (126.96.36.199)
> In /usr/share/doc/r-doc-html/manual/R-data.html (at least that's where
> it is on Debian...) the documentation is unclear. Comments below.
The documentation is, I believe, correct and precise as it stands.
What it doesn't emphasize and mention is the difference between
"BSD socket" and "socket connection", or an "R connection of the socket
type". And it is recommended that you
use "socket connection" instead of "BSD socket".
The earlier "BSD socket" is created, read, write with
"make.socket"/"read.socket"/"write socket"/"close socket".
The newer "socket connection" is created by creating a new connection
object like this:
con <- socketConnection(port = 79, blocking = TRUE)
and invoking the open/write/read method of the "connection"
object. type "?connection" in an R prompt for details.
"BSD socket" is a unix concept, "socket connection" is an R object.
The paragraph should have put "BSD socket" and "socket connection"
in quote or italics. Make more sense?
Somebody please fix the paragraph... :-).
> The paragraph has unclear references, and I have no idea what
> it actually means.
>>>Base R comes with some facilities to communicate via BSD sockets on systems
> that support them (...). One potential problem....
>>>For new projects it is suggested that socket connections are used instead.
> "Used instead"? Instead of what?
>>>The earlier low-level interface is given by functions make.socket,
> read.socket, write.socket and close.socket.
> What does "earlier" mean? Earlier than what?
> R-devel at r-project.org mailing list
More information about the R-devel