#2: external format guessing for incoming messages --------------------------+------------------------------------------------- Reporter: afuchs | Owner: ehuelsmann Type: enhancement | Status: assigned Priority: major | Milestone: Component: chat | Version: Resolution: | Keywords: Has_patch: 1 | --------------------------+------------------------------------------------- Comment (by ehuelsmann):
Ok, I have investigated that we can't do our own buffering, since there's no platform independent way to tell how much data we can read from the stream without blocking for more input.
We can OTOH use read-char to create a somewhat read-line like function: read-sequence-until; it reads a stream until a limiting sequence is matched. In our case, we could use '(13 10) as the limiting sequence.
I noticed in the SBCL sources that read-char is a buffered call just as any other stream read action, so, at least for SBCL, the performance impact should be limited.