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

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 jeff.a.r...@gmail.com wrote: R-devel:

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