(DEFINE-FILE-INFO READTABLE "INTERLISP" PACKAGE "INTERLISP") (FILECREATED " 7-Sep-88 17:13:08" {ERINYES}MEDLEY>CHATSERVER-TCP.;2 1699 changes to%: (VARS CHATSERVER-TCPCOMS) (FNS TCP.CHAT.LISTENER)) (* " Copyright (c) 1988 by Xerox Corporation. All rights reserved. ") (PRETTYCOMPRINT CHATSERVER-TCPCOMS) (RPAQQ CHATSERVER-TCPCOMS ((FNS TCP.CHAT.LISTENER TCPCHATSERVER) (FILES TCP CHATSERVER))) (DEFINEQ (TCP.CHAT.LISTENER [LAMBDA (PORT) (* ; "Edited 2-Sep-88 23:09 by masinter") (LET* [(INSTREAM (TCP.OPEN NIL NIL (OR PORT \TCP.TELNET.PORT) 'PASSIVE 'INPUT T)) (OUTSTREAM (AND INSTREAM (TCP.OTHER.STREAM INSTREAM] (* ;; "ok, I'm the server") (PROCESS.NAME (THIS.PROCESS) 'CHATSERVER) (PROCESSPROP (THIS.PROCESS) 'RESTARTABLE NIL) (* ;; "spawn another listener") (ADD.PROCESS (LIST (FUNCTION TCP.CHAT.LISTENER) (KWOTE PORT)) 'RESTARTABLE 'HARDRESET) (PROCESSPROP (THIS.PROCESS) 'RESTARTABLE NIL) (CHATSERVEROPENFN INSTREAM OUTSTREAM]) (TCPCHATSERVER [LAMBDA NIL (* ejs%: "26-Mar-86 16:47") (DEL.PROCESS 'TCP.CHAT.LISTENER) (ADD.PROCESS '(TCP.CHAT.LISTENER) 'RESTARTABLE 'HARDRESET]) ) (FILESLOAD TCP CHATSERVER) (PUTPROPS CHATSERVER-TCP COPYRIGHT ("Xerox Corporation" 1988)) (DECLARE%: DONTCOPY (FILEMAP (NIL (484 1585 (TCP.CHAT.LISTENER 494 . 1343) (TCPCHATSERVER 1345 . 1583))))) STOP