Displaying 20 results from an estimated 1000 matches similar to: "blocking question with socketConnections"
2011 Jun 30
0
socket blocking with readBin
R Gurus / Ninjas / Wizards:
On both R 2.12 (Windows 7) and R 2.13 (OS X 10.5) I have tried the
following:
1. In one instance of R open a socket via:
s1 <- socketConnection(server=TRUE, open="a+b", port=31415,
blocking=FALSE);
2. And in another instance I do the following:
s2 <- socketConnection(open="a+b", port=31415, blocking=FALSE);
And so I
2005 Feb 17
1
socket problems (maybe bugs?)
Dear R Gurus,
for some purpose i have to use a socket connection, where i have to read
and write both text and binary data (each binary data package will be
preceeded by a header line).
When experimenting, i encountered some problems (with R-2.0.1 under
different Linuxes (SuSE and Gentoo)).
Since the default mode for socket connections is non-blocking,
i first tried socketSelect() in order to
2017 Oct 05
0
socketSelect(..., timeout): non-integer timeouts in (0, 2) (?) equal infinite timeout on Linux - weird
I'd like to follow up/bump the attention to this bug causing the
timeout to fail for socketSelect() on Unix. It is still there in R
3.4.2 and R-devel. I've identified the bug in the R source code - the
bug is due to floating-point precisions and comparison using >=. See
PR17203 (https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=17203)
for details and a patch. I've just
2017 Oct 05
1
socketSelect(..., timeout): non-integer timeouts in (0, 2) (?) equal infinite timeout on Linux - weird
Fixed in 73470
Best,
Tomas
On 10/05/2017 06:11 AM, Henrik Bengtsson wrote:
> I'd like to follow up/bump the attention to this bug causing the
> timeout to fail for socketSelect() on Unix. It is still there in R
> 3.4.2 and R-devel. I've identified the bug in the R source code - the
> bug is due to floating-point precisions and comparison using >=. See
> PR17203
2016 Oct 01
2
socketSelect(..., timeout): non-integer timeouts in (0, 2) (?) equal infinite timeout on Linux - weird
There's something weird going on for certain non-integer values of
argument 'timeout' to base::socketSelect(). For such values, there is
no timeout and you effectively end up with an infinite timeout. I
can reproduce this on R 3.3.1 on Ubuntu 16.04 and RedHat 6.6, but not
on Windows (via Linux Wine).
# 1. In R master session
> con <- socketConnection('localhost', port
2010 Oct 11
0
OT: snow socket clusters with VirtualBox and VMware player (Linux host, Win guest)
Dear All,
I am trying to create socket clusters (using snow and snowfall) with a
Windows OS. I am running Windows inside VirtualBox and VMware player
(i.e., Windows is guest) from a Debian Linux host system (I've tried
in two different Linux systems, an AMD x86-64 workstation and an Intel
i686 laptop). However, almost always seting up the cluster fails:
either R will hang forever or I will
2016 Jan 15
1
Error in socketConnection(master, port = port, blocking = TRUE, open = "a+b", : cannot open the connection
Dear All
I have sucessfully created cluster of four nodes using localhost in my local machine by executing the following command
> cl<-makePSOCKcluster(c(rep("localhost",4)),outfile='',homogeneous=FALSE,port=11001)
starting worker pid=4271 on localhost:11001 at 12:12:26.164
starting worker pid=4280 on localhost:11001 at 12:12:26.309
starting worker pid=4289 on
2006 Jul 21
1
Problems Reading from Socket
My followup question went unanswered in another thread, so I thought
I'd start a new one and rephrase it.
I need to use CGI POST to retrieve data from a server, so thanks to
Duncan's suggestion, I used the httpRequest package as example code
for doing so. BUT, I have another problem. The data retrieved from
the socket has occasional problems. I include example code below to
2003 Feb 07
1
Bug in socketConnection (PR#2535)
Platform: Windows
Version: 1.6.2
When first called, socketConnection gives an error. On subsequent calls it
performs correctly. Thus the first call has the effect of "priming" the
connection. Eg
> socketConnection(port=50)
Error in socketConnection(port = 50) : unable to open connection In
addition: Warning message:
localhost:50 cannot be opened
> MIM <-
2011 Nov 22
0
snow package, socketConnection error, SSH, in Windows 7 x64
Hi. I have some problems trying to make cluster via "snow" package and
haven't found a solution for my problem in archives and relative topics.
I installed ssh server using cygwin and set a password-less SSH Login.
In R session after starting ssh service:
> system("ssh 10.10.5.15 date")
Tue Nov 22 16:22:36 AST 2011
But when I make connection:
> con <-
2023 Feb 15
2
Question on non-blocking socket
Hi,
December 27, 2021 I started a thread asking for help troubleshooting
non-blocking sockets.
While developing the RBaseX client, I had issues with the authentication
process. It eventually turned out that a short break had to be inserted
in this process between sending the credentials to the server and
requesting the status. Tomas Kalibera put me on the right track by
drawing my attention
2023 Feb 15
1
Question on non-blocking socket
On 2/15/23 01:24, Ben Engbers wrote:
> Hi,
>
> December 27, 2021 I started a thread asking for help troubleshooting
> non-blocking sockets.
> While developing the RBaseX client, I had issues with the
> authentication process. It eventually turned out that a short break
> had to be inserted in this process between sending the credentials to
> the server and requesting
2009 May 18
2
readBin on binary non-blocking connections (Windows & Unix differences/bugs)
R-devel:
I am encountering a consistency issue using socketConnection and
readBin with *non-blocking* connections on Unix and Windows XP (no
Vista to test).
I am a bit confused by the behavior of *non-blocking* connections
under Windows specifically. When calling readBin on a non-blocking
connection when there is no data to read on the socket, the connection
under Unix will return a vector of
2006 Aug 29
1
writeChar
I have recently been using writeChar and writeBin to write binary
files. These functions makes it very easy to write OS-independent
files, which I am very happy with.
I have however found a few issues, best illustrated by a short example
> con <- file("test", open = "wb")
> writeChar(as.character(c("ab", "ab")), nchars = c(3), con = con,
2010 Jun 16
2
Sending a null byte to a socket
Hello,
I am trying to write some code in R to communicate over sockets via the
STOMP protocol (http://stomp.codehaus.org/Protocol).
As you can see, a null byte (ASCII 0) is used as the "over" signal.
I'd like to be able to do something like this:
write.socket(socket, "CONNECT\nlogin: me\npasscode: pass\n\n\000")
However, R does not like it when you put "\000"
2007 May 24
2
object getConnection
Hi,
I use the functions socketConnections() and getConnection()
which are working fine. Thanks to the authors.
After opening nicely some socketConnection,
getConnection(3) returns something like :
description class mode text opened can read can write
"->127.0.0.1:7496" "socket" "wb" "binary" "opened" "yes"
2001 Jul 17
1
How to write the bytes 00 01 00 to a file/connection?
Is there any way to write (8-bit) bytes to a file which works on all [R]
platforms? I have been looking at
1) writeBin
2) writeChar
3) cat
and neither of them manage to write arbitrary sequences of bytes (0-255).
For instance, I would like to create a binary file of length three
containing the bytes 0, 1 and 0. I [R] I have the following vector of bytes:
bfr <- c(0,1,0)
1) For
2002 Jun 18
3
Maybe a problem in binary read/write (PR#1688)
Full_Name: Johnny Accot
Version: 1.5.1
OS: Linux
Submission from: (NULL) (198.4.83.52)
Hi.
I'm having a problem with the binary read/write functions. I'm writing a device
driver in R (why not?) and of course I have to send a couple commands to the
device. Typically, I send one byte, receive one acknowledgement byte, send
another byte, receive an ACK, and so on. At least this is what
2018 Mar 09
0
parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
I just noticed that parallel:::.slaveRSOCK() passes 'timeout' to
socketConnection() as a character, i.e. there's a missing timeout <-
as.integer(timeout), cf. port <- as.integer(port) and useXDR <-
as.logical(value):
> parallel:::.slaveRSOCK
function ()
{
makeSOCKmaster <- function(master, port, timeout, useXDR) {
port <- as.integer(port)
con
2018 Mar 09
0
parallel:::newPSOCKnode(): background worker fails immediately if socket on master is not set up in time (BUG?)
I'm happy to look at a patch that does this. I'd start with a small
interval and increase it by 50%, say, on each try wit a max retry time
limit. This isn't eliminating the problem,only reducing the
probability, but still worth it. I had considered doing something like
this but it didn't seem necessary at the time. You don't want to retry
indefinitely since the connection