Path: utzoo!attcan!uunet!samsung!usc!apple!agate!shelby!neon!Gang-of-Four!andy From: andy@Gang-of-Four.Stanford.EDU (Andy Freeman) Newsgroups: comp.lang.lisp Subject: Re: How do I get and use input from a telnet session in Lisp? Message-ID: <1990May29.003640.7040@Neon.Stanford.EDU> Date: 29 May 90 00:36:40 GMT References: <16796@phoenix.Princeton.EDU> Sender: news@Neon.Stanford.EDU (USENET News System) Organization: Computer Science Department, Stanford University Lines: 22 In article <16796@phoenix.Princeton.EDU> bskendig@phoenix.Princeton.EDU (Brian Kendig) writes: >Here's an example. Say that I first need to connect to port 4321 of >the machine with address 128.129.130.131. Ordinarily I'd issue a >telnet command from the command line, but I'd like the same thing done >entirely by my program. A number of lisp implementations, such as Lucid's Common Lisp, provide facilities for running other processes and communicating with them as if they were sequential files. One useful process to run is a telnet process. Depending on the program at the other end, strings or s-expressions may be the appropriate language. (Personally, I've always had a lisp process on the other end, so I passed s-expressions back and forth and so that I could parse them with read.) It isn't too difficult to figure out where and when to flush the relevant buffers. -andy -- UUCP: {arpa gateways, sun, decwrl, uunet, rutgers}!neon.stanford.edu!andy ARPA: andy@neon.stanford.edu BELLNET: (415) 723-3088