Subject: Re: network programming
From: (Rob Warnock)
Date: Wed, 12 Dec 2007 17:16:15 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Andreas Davour  <anteRUN@updateLIKE.uu.HELLse> wrote:
| "Alex Mizrahi" <> writes:
| > what matters is if it is a binary or character stream (and
| > what encoding character has). i would recommend flexi-streams 
| > if you need some transcoding.
| So the main difference between oll the different kind of streams biols
| down to if it's a character stream or a binary stream? That makes it
| easier I guess. Reading the CMUCL/SBCL manual you can get confused by
| the different stream implementations, you know.

Yes. If you're doing anything at all fancy with CMUCL streams you 
probably want to "look under the covers" at the SYSTEM:FD-STREAM class.
For example, few people know that CMUCL actually does provide a form
of bivalent stream on FD-STREAMs (which includes Unix/Linux file
streams as well as sockets) with the little-known :CLASS option
to OPEN, e.g.:

    > (open "foo" :class 'binary-text-stream :element-type :default)

    #<Binary-text Stream for file "foo">

You can use both READ-CHAR and READ-BYTE on such a stream.


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607