[Ecls-list] Redesigning sockets and ordinary streams

Juan Jose Garcia Ripoll jlr at mpq.mpg.de
Thu Nov 10 02:19:01 UTC 2005


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.

The think I like about 1) is that we would no longer need to include the
TCP code in the core library. It could all live in sockets.lisp, thus
making the library smaller.

One can also argue that 1) removes an additional layer (fread, fwrite,
etc), and that this should improve performance because the buffering
that the C library provides is redundant with the buffering that the
kernel supplies.

OTOH 2) is way much simpler.

Regards,

Juanjo






More information about the ecl-devel mailing list