[Sciviews-commits] r502 - in pkg: svDialogs/man svSocket svSocket/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Dec 21 17:07:29 CET 2012
Author: phgrosjean
Date: 2012-12-21 17:07:29 +0100 (Fri, 21 Dec 2012)
New Revision: 502
Modified:
pkg/svDialogs/man/dlgForm.Rd
pkg/svSocket/DESCRIPTION
pkg/svSocket/NEWS
pkg/svSocket/man/sendSocketClients.Rd
pkg/svSocket/man/svSocket-package.Rd
Log:
Added example in svSocket's sendSocketClients() and instructions to install yad on Ubuntu in svDialogs' dlgForm() function.
Modified: pkg/svDialogs/man/dlgForm.Rd
===================================================================
--- pkg/svDialogs/man/dlgForm.Rd 2012-12-18 14:10:34 UTC (rev 501)
+++ pkg/svDialogs/man/dlgForm.Rd 2012-12-21 16:07:29 UTC (rev 502)
@@ -59,6 +59,14 @@
\code{:CLR} to enter a RGB color,
\code{:BTN} to create a button that execute some code,
\code{:LBL} to add a label.
+
+ For the moment, the form dialog box is only supported on Linux. You have to
+ install yad to get access to it. On Ubuntu, you do so by:
+ \preformatted{
+sudo add-apt-repository ppa:webupd8team/y-ppa-manager
+sudo apt-get update
+sudo apt-get install yad
+ }
}
\value{
Modified: pkg/svSocket/DESCRIPTION
===================================================================
--- pkg/svSocket/DESCRIPTION 2012-12-18 14:10:34 UTC (rev 501)
+++ pkg/svSocket/DESCRIPTION 2012-12-21 16:07:29 UTC (rev 502)
@@ -1,7 +1,7 @@
Package: svSocket
Type: Package
-Version: 0.9-53
-Date: 2012-03-29
+Version: 0.9-54
+Date: 2012-12-21
Title: SciViews GUI API - R Socket Server
Authors at R: c(person("Philippe", "Grosjean", role = c("aut", "cre"),
email = "phgrosjean at sciviews.org"),
Modified: pkg/svSocket/NEWS
===================================================================
--- pkg/svSocket/NEWS 2012-12-18 14:10:34 UTC (rev 501)
+++ pkg/svSocket/NEWS 2012-12-21 16:07:29 UTC (rev 502)
@@ -1,5 +1,10 @@
= svSocket News
+== Changes in svSocket 0.9-54
+
+* An example is added to ?sendSocketClients.
+
+
== Changes in svSocket 0.9-53
* A bug in evalServer() leading to evaluation of a condition of length > 1 in a
Modified: pkg/svSocket/man/sendSocketClients.Rd
===================================================================
--- pkg/svSocket/man/sendSocketClients.Rd 2012-12-18 14:10:34 UTC (rev 501)
+++ pkg/svSocket/man/sendSocketClients.Rd 2012-12-21 16:07:29 UTC (rev 502)
@@ -24,6 +24,38 @@
\seealso{ \code{\link{closeSocketClients}}, \code{\link{processSocket}} }
+\example{
+\dontrun{
+## Start an R process (R#1) and make it a server
+require(svSocket)
+serverport <- 8888 # Port 8888 by default, but you can change it
+startSocketServer(port = serverport)
+
+
+## Start a second R process (R#2) and run this code in it (the R client):
+require(svSocket)
+## Connect with the R socket server
+con <- socketConnection(host = "localhost", port = 8888, blocking = FALSE)
+
+
+## Now, go back to the server R#1
+getSocketClients() # You should have one client registered
+## Send something to all clients from R#1
+sendSocketClients("Hi there!")
+
+
+## Switch back to client R#2
+## Since the connection is not blocking, you have to read lines actively
+readLines(con)
+## Note the final empty string indicating there is no more data
+close(con) # Once done...
+
+
+## Switch to the R#1 server and close the server
+stopSocketServer(port = serverport)
+}
+}
+
\keyword{ IO }
\concept{ stateful socket server interprocess communication }
Modified: pkg/svSocket/man/svSocket-package.Rd
===================================================================
--- pkg/svSocket/man/svSocket-package.Rd 2012-12-18 14:10:34 UTC (rev 501)
+++ pkg/svSocket/man/svSocket-package.Rd 2012-12-21 16:07:29 UTC (rev 502)
@@ -37,8 +37,8 @@
\tabular{ll}{
Package: \tab svSocket\cr
Type: \tab Package\cr
- Version: \tab 0.9-53\cr
- Date: \tab 2012-03-29\cr
+ Version: \tab 0.9-54\cr
+ Date: \tab 2012-12-21\cr
License: \tab GPL 2 or above, at your convenience\cr
}
% TODO: add description of main functions here. Also add examples
More information about the Sciviews-commits
mailing list