Re: [Rd] readBin on binary non-blocking connections (Windows & Unix differences/bugs)

2009-05-19 Thread Jeff Ryan
R-devel: I'll escalate this to a bug report once I can fully document, but something is seriously wrong with readBin on non-blocking connections. >From ?readBin Value: For 'readBin', a vector of appropriate mode and length the number of items read (which might be less than 'n'). On W

Re: [Rd] readBin on binary non-blocking connections (Windows & Unix differences/bugs)

2009-05-18 Thread Jeff Ryan
Thanks Gabor. Unfortunately read/writeLines won't work in this particular application. Nor does readChar, as the returned values are not of a fixed size. I need to read each unknown length "character" up until an embedded null. readBin does this (almost) perfectly. My current workaround is to

Re: [Rd] readBin on binary non-blocking connections (Windows & Unix differences/bugs)

2009-05-18 Thread Gabor Grothendieck
Ryacas uses non-blocking sockets and works across all platforms but uses readLines/writeLines, rather than readBin, to communicate with yacas. You could look at its source code in case it brings anything to mind. On Mon, May 18, 2009 at 1:40 PM, Jeff Ryan wrote: > R-devel: > > I am encountering

[Rd] readBin on binary non-blocking connections (Windows & Unix differences/bugs)

2009-05-18 Thread Jeff Ryan
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 connec