[Sciviews-commits] r176 - in pkg/svSocket: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Aug 11 15:08:32 CEST 2009


Author: phgrosjean
Date: 2009-08-11 15:08:31 +0200 (Tue, 11 Aug 2009)
New Revision: 176

Removed:
   pkg/svSocket/R/sendSocketServer.R
   pkg/svSocket/man/sendSocketServer.Rd
Modified:
   pkg/svSocket/NAMESPACE
   pkg/svSocket/NEWS
   pkg/svSocket/man/evalServer.Rd
   pkg/svSocket/man/processSocket.Rd
   pkg/svSocket/man/sendSocketClients.Rd
Log:
evalSocketServer() eliminated

Modified: pkg/svSocket/NAMESPACE
===================================================================
--- pkg/svSocket/NAMESPACE	2009-08-10 22:59:17 UTC (rev 175)
+++ pkg/svSocket/NAMESPACE	2009-08-11 13:08:31 UTC (rev 176)
@@ -8,7 +8,6 @@
 	   parSocket,
        processSocket,
        sendSocketClients,
-	   sendSocketServer,
        closeSocketClients,
        startSocketServer,
        stopSocketServer)

Modified: pkg/svSocket/NEWS
===================================================================
--- pkg/svSocket/NEWS	2009-08-10 22:59:17 UTC (rev 175)
+++ pkg/svSocket/NEWS	2009-08-11 13:08:31 UTC (rev 176)
@@ -4,7 +4,9 @@
 
 * evalServer() slightly reworked
 
+* sendSocketServer() eliminated (superseeded by evalServer())
 
+
 == Changes in svSocket 0.9-45
 
 * Bug correction in evalServer()

Deleted: pkg/svSocket/R/sendSocketServer.R
===================================================================
--- pkg/svSocket/R/sendSocketServer.R	2009-08-10 22:59:17 UTC (rev 175)
+++ pkg/svSocket/R/sendSocketServer.R	2009-08-11 13:08:31 UTC (rev 176)
@@ -1,19 +0,0 @@
-"sendSocketServer" <-
-function (text, host = "localhost", port = 8888, ...)
-{
-	# This function connects to a R socket server, evaluates a command in it
-	# get results and closes the connection. See example for a client that
-	# connects for a longer time and sends several commands to the server
-	if (!capabilities("sockets"))
-		stop("R must support socket connections")
-	con <- socketConnection(host = host, port = port,
-		blocking = FALSE, ...)
-	on.exit(close(con))
-	# <<<q>>> tells the R socket server to close the connection once results
-	# are send back to the client
-	writeLines(paste("<<<q>>>", text, sep = ""), con)
-	res <- ""
-	while(regexpr("\f", res) < 0)
-		res <- paste(res, readLines(con), sep = "", collapse = "\n")
-	return(sub("\f", "", res))
-}

Modified: pkg/svSocket/man/evalServer.Rd
===================================================================
--- pkg/svSocket/man/evalServer.Rd	2009-08-10 22:59:17 UTC (rev 175)
+++ pkg/svSocket/man/evalServer.Rd	2009-08-11 13:08:31 UTC (rev 176)
@@ -25,7 +25,7 @@
 
 \author{Matthew Dowle (\email{m.dowle at wintoncapital.com})}
 
-\seealso{ \code{\link{sendSocketServer}} }
+\seealso{ \code{\link{sendSocketClients}} }
 
 \examples{
 \dontrun{

Modified: pkg/svSocket/man/processSocket.Rd
===================================================================
--- pkg/svSocket/man/processSocket.Rd	2009-08-10 22:59:17 UTC (rev 175)
+++ pkg/svSocket/man/processSocket.Rd	2009-08-11 13:08:31 UTC (rev 176)
@@ -73,8 +73,8 @@
 \author{Philippe Grosjean (\email{phgrosjean at sciviews.org})}
 
 \seealso{ \code{\link{startSocketServer}}, \code{\link{sendSocketClients}},
-  \code{\link{sendSocketServer}}, \code{\link[svMisc]{parSocket}},
-  \code{\link[svMisc]{Parse}}, \code{\link[svMisc]{captureAll}} }
+  \code{\link[svMisc]{parSocket}}, \code{\link[svMisc]{Parse}},
+  \code{\link[svMisc]{captureAll}} }
 
 \examples{
 \dontrun{

Modified: pkg/svSocket/man/sendSocketClients.Rd
===================================================================
--- pkg/svSocket/man/sendSocketClients.Rd	2009-08-10 22:59:17 UTC (rev 175)
+++ pkg/svSocket/man/sendSocketClients.Rd	2009-08-11 13:08:31 UTC (rev 176)
@@ -20,7 +20,6 @@
 
 \author{Philippe Grosjean (\email{phgrosjean at sciviews.org})}
 
-\seealso{ \code{\link{closeSocketClients}}, \code{\link{processSocket}},
-  \code{\link{sendSocketServer}} }
+\seealso{ \code{\link{closeSocketClients}}, \code{\link{processSocket}} }
 
 \keyword{ IO }

Deleted: pkg/svSocket/man/sendSocketServer.Rd
===================================================================
--- pkg/svSocket/man/sendSocketServer.Rd	2009-08-10 22:59:17 UTC (rev 175)
+++ pkg/svSocket/man/sendSocketServer.Rd	2009-08-11 13:08:31 UTC (rev 176)
@@ -1,51 +0,0 @@
-\name{sendSocketServer}
-\alias{sendSocketServer}
-
-\title{ Send data to an existing R socket server and disconnect. }
-
-\description{
-  The text is send to one R socket server and evaluated there as a command in
-  \code{.GlobalEnv}. Results (text as it should be printed on the console) is
-  returned to the client and the client then disconnects automatically (code
-  received for indicating to disconnect is \\f... don't use it for other purposes)!
-}
-
-\usage{
-sendSocketServer(text, host = "localhost", port = 8888, ...)
-}
-
-\arguments{
-  \item{text}{ The text (command) to send and evaluate in the server. }
-  \item{host}{ The name or address of the host where the R socket server
-    is located. }
-  \item{port}{ The port of the R socket server. }
-  \item{\dots}{ Further arguments passed to communicate with the server
-    (not used yet) }
-}
-
-\author{Philippe Grosjean (\email{phgrosjean at sciviews.org})}
-
-\seealso{ \code{\link{evalServer}}, \code{\link{sendSocketClients}},
-  \code{\link{closeSocketClients}}, \code{\link{processSocket}} }
-
-\examples{
-\dontrun{
-# Start a R socket server in an instance #1 of R
-# require(svSocket)
-# startSocketServer()
-# data(iris) # To get something in .GlobalEnv
-#
-# Now, start an instance #2 of R on the same machine and do:
-require(svSocket)
-cat(sendSocketServer("ls()"))
-# You should read, at least, iris
-cat(sendSocketServer("x <- 2"))
-# Nothing happens, but switch to R #1 and type
-# x
-# to see the result
-
-# For a more elaborate version, use evalServer()
-}
-}
-
-\keyword{ IO }



More information about the Sciviews-commits mailing list