[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unbuffered socket I/O
From: |
Kevin Ryde |
Subject: |
Re: Unbuffered socket I/O |
Date: |
Thu, 01 Mar 2007 08:24:51 +1100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
address@hidden (Ludovic Courtès) writes:
>
> (uniform-vector-read! vec port)))
Slackness in the implementation of that function. It knows a size to
read and should come out as a read() system call of that size. Yet it
always goes through the port buffer. You need to post the problem
instead of leaping to a "solution".
read-string!/partial is much better in that respect. Maybe that func
should be loosened up to work on non-fports too, that could be nice.
It's a bit of a failing of the ptab port functions that there's no
"read N bytes", but that needn't prevent uniform-vector-read! doing
the right thing on fports.
Could think about whether it ought to make multiple calls to fill the
requested size. I guess that's how it is now, in effect, so probably
yes. Could also think if those calls should then cope with O_NONBLOCK
too, by sleeping in select() if finding there's nothing to read yet.
On a single read call I would say let it throw an error, but if the
aim is to block until the requested size then it's easy enough to
cope.
- Unbuffered socket I/O, Ludovic Courtès, 2007/02/23
- Re: Unbuffered socket I/O, Neil Jerram, 2007/02/23
- Re: Unbuffered socket I/O, Kevin Ryde, 2007/02/25
- Re: Unbuffered socket I/O, Kevin Ryde, 2007/02/26
- Re: Unbuffered socket I/O, Ludovic Courtès, 2007/02/28
- Re: Unbuffered socket I/O, Kevin Ryde, 2007/02/28