Readline for Sockets not guaranteed to actually read a line

Gerhard R. gerd.r.devel at googlemail.com
Sun Mar 10 15:31:34 UTC 2013


Greetings.

Due to https://github.com/parrot/parrot/blob/master/src/io/utilities.c#L446
calling readline() on a socket may not actually read a whole line,
which means this needs to be handled again by a higher layer, eg
https://github.com/gerdr/rakudo/blob/dfe1eb7d1f7d44799c31e6972337c5a39c90584c/src/core/IO/Socket/INET.pm#L106

Why was this decision made? If I request a whole line, I do expect to
get a whole line and not just a chunk of it, regardless of how long
the code will have to block to do so...

-- gerdr


More information about the parrot-dev mailing list