[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Listening to TCP port?

In article <RICE.94Jun2144208@hpp-ss10-1.stanford.edu> rice@KSL.Stanford.EDU (James Rice) writes:

   From: rice@KSL.Stanford.EDU (James Rice)

   Hi, I'm in search of the necessary (hopefully) 3 lines of code under
   each of MCL and EXCL that will let me listen to a TCP port and, upon
   receipt of a connection, open a stream to it.

For Franz Allegro see the source file ipc.cl in the lisp library.
This code implements the both client and server tcp streams that are
used for things like the emacs-lisp interface.

There are some extraneous and ugly process startup protocols bundled
in the socket server that you undoubtedly won't want, but you can
easily strip out the useful pieces.  (It has been better modularized
for an upcoming release.)  I'd suggest copying the code to a new
package before hacking it, since any incompatible changes will break
the emacs-lisp interface.