From: sm (Steve Haflich)

Subject: Re: flushing socket streams

Date: 1994-8-19 14:26

   To: <cs.berkeley.edu at allegro-cl>
   Date: Thu, 18 Aug 94 17:46:19 +0200
   From: Stephen P Spackman <dfki.uni-sb.de at spackman>
   
   I'm trying to write a server that listens at a tcp port in ACL 4.2.
   
   It almost works; I do all the socket things through the foreign funciton
   interface, make an instance of 'STREAM:BIDIRECTIONAL-BINARY-SOCKET-STREAM,
   and everything seems to go fine - but #'finish-output does nothing.
   
   My server won't be very useful if it has to close its channels in order
   to acknowledge an open! :-)

The default implementation of FINISH-OUTPUT was intended just to
delegate to FORCE-OUTPUT, but I believe there was a bug (since fixed)
causing it to do nothing for certain stream classes.  Try using
FORCE-OUTPUT instead.

But rather than writing your own socket server you should consider
using the one included in the Allegro distribution in the library
source file ipc.cl.  It provides both client and server facilities.
You might well need to adapt the sources to your needs, but the
mechanism (which underlies the emacs-lisp interface) is well debugged
and doesn't depend on any messy foreign functions.