Re: [Rd] readLines() fails on non-blocking connections when encoding="UTF-8" or encoding="ASCII"

2023-06-06 Thread Ivan Krylov
В Mon, 5 Jun 2023 21:34:37 -0700 Peter Meilstrup пишет: > socketSelect(list(incoming)) #TRUE > readLines(incoming, 1) # I get character(0) (incorrect) > readChar(incoming, 100) > # "again\nagain\nagain\n", so readChar saw what readLines() did not The difference turns out to be that readChar()

[Rd] readLines() fails on non-blocking connections when encoding="UTF-8" or encoding="ASCII"

2023-06-05 Thread Peter Meilstrup
Hello R-devel, I have been trying to wrap my head around non-blocking connections and have not been having them behave as advertised. The issue I am having is that readLines() gets "stuck." If it reaches the end of a stream once, it does not ever return any more data, even when more is available