From ... From: Erik Naggum Subject: Re: `read-sequence' and sockets Date: 1998/11/26 Message-ID: <3121036942219149@naggum.no>#1/1 X-Deja-AN: 415752933 References: mail-copies-to: never Organization: Naggum Software; +47 8800 8879; http://www.naggum.no Newsgroups: comp.lang.lisp * Sam Steingold | `read-sequence' doesn't specify whether it reads bytes or chars, leaving | that for the stream to decide. actually, it is an error for the element-type of the stream and the sequence to disagree. apart from that, anything that both accept will actually work. | what if the stream happened to be a socket? a socket should be a stream. | most implementations provide this extension, but they disagree on what | `read-sequence' should do with them (clisp refuses to do anything and | instead provides `read-byte-sequence' and `read-char-sequence' for | sockets; allegro insists on using chars). please don't claim what you have only guessed to be facts. it is f*king annoying and makes it needlessly irritating to help you when you have effectively refused help before you asked the question you need answered. I have used sockets with :element-type '(unsigned-byte 8) in Allegro CL since 4.3, and it hasn't stopped working in 5.0. remember to create your vector with the same element-type, and Allegro CL is happy as can be. in other words, Allego CL insists on doing what you ask it to do. if you only ask for characters, Allegro CL insists on giving you characters, not what you didn't ask for, even if you wanted something different. this is why I use Allegro CL in mission-critical software, instead of C, which quite often insists on doing something I didn't tell it to do, no matter whether I wanted it or not. | Any chance X3J13 will ever specify this? they already _have_ specified it as far as they could. the socket classes are subclasses of STREAM in Allegro CL, and thus have to behave as all streams do. such is the hallmark of a quality extension. | What am I supposed to use to read bytes from a socket in ACL? the documentation. #:Erik -- The Microsoft Dating Program -- where do you want to crash tonight?