[Ecls-list] Redesigning sockets and ordinary streams
Juan Jose Garcia Ripoll
lisp at arrakis.es
Thu Nov 10 04:36:06 UTC 2005
On Thu, 2005-11-10 at 11:17 +0100, Juan Jose Garcia Ripoll wrote:
> Hi,
>
> it seems we must rethink the whole implementation of sockets. I tried
> Bechmann's small webserver on my Ubuntu 5.10 and it causes an error
> because the C library tries to fseek() on the stream that we opened with
> the socket.
>
> Now I have several possibilities on mind:
>
> 1) Drop C streams entirely, substituting them with calls to write/read.
>
> 2) Reuse the code for wsockets using it with ordinary sockets.
Doing
setbuf(stream->stream.fd, NULL)
seems also to fix the problem, but I am pretty sure that this is a hack.
The question is that fdopen() is designed for files and one is not sure
whether the f*() routines (and here f* stands for fread, fwrite,
etc ;->) will perform implicit fseek() at some point. Hence, I do not
consider this as a solution.
Regards
Juanjo
More information about the ecl-devel
mailing list