[R] close connection, closeAllConnections()

mel mel at altk.com
Wed Jan 9 16:21:02 CET 2008


close connection, closeAllConnections()

Hello,

For windows2000 and windowsXP, R.2.6.1
I have a little problem with the following lines

 > socketConnection('127.0.0.1', port=7496, server=F, blocking=F, 
open='wb', encoding='');
        description              class               mode 
text             opened           can read
"->127.0.0.1:7496"           "socket"               "wb" 
"binary"           "opened"              "yes"
          can write
              "yes"
 > showConnections(all=TRUE)
   description        class      mode text     isopen   can read can write
0 "stdin"            "terminal" "r"  "text"   "opened" "yes"    "no"
1 "stdout"           "terminal" "w"  "text"   "opened" "no"     "yes"
2 "stderr"           "terminal" "w"  "text"   "opened" "no"     "yes"
3 "->127.0.0.1:7496" "socket"   "wb" "binary" "opened" "yes"    "yes"
 > closeAllConnections()
Erreur dans close.socket(getConnection(set[i])) : invalid 'socket'
argument

with the previous R version,
calling closeAllConnections() did nicely close connection #3
... but now, this works no more.

I'm missing something and would be very thankful for any
infos/pointer about this little worry.
(I believe some changes were planned with the connection functions
in R.2.6.1, could it be that ?)
Thanks
Vincent




More information about the R-help mailing list