[R-gregmisc-commits] r2140 - pkg/gtools/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Aug 15 21:14:10 CEST 2016


Author: warnes
Date: 2016-08-15 21:14:10 +0200 (Mon, 15 Aug 2016)
New Revision: 2140

Modified:
   pkg/gtools/R/setTCPNoDelay.R
Log:
Modify setTCPNoDelay to work with current socket objects

Modified: pkg/gtools/R/setTCPNoDelay.R
===================================================================
--- pkg/gtools/R/setTCPNoDelay.R	2016-08-15 19:13:14 UTC (rev 2139)
+++ pkg/gtools/R/setTCPNoDelay.R	2016-08-15 19:14:10 UTC (rev 2140)
@@ -5,7 +5,11 @@
 
     buffer <- paste(rep(" ", 1000), sep='', collapse='')
 
-    conn <- getConnection(socket[1])
+    if("sockconn" %in% class(socket))
+      conn <- getConnection(socket[1])
+    else
+      conn <- socket
+ 
     
     retval <- .C("R_setTCPNoDelay",
                  socket=as.integer(socket[1]),



More information about the R-gregmisc-commits mailing list