Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!pt.cs.cmu.edu!rochester!udel!princeton!phoenix!bskendig From: bskendig@phoenix.Princeton.EDU (Brian Kendig) Newsgroups: comp.lang.lisp Subject: How do I get and use input from a telnet session in Lisp? Message-ID: <16796@phoenix.Princeton.EDU> Date: 28 May 90 04:17:08 GMT Reply-To: bskendig@phoenix.Princeton.EDU (Brian Kendig) Organization: Starfleet Academy: Princeton University PQC PTC CIT EECS SCI Lines: 34 Here's the scenario: In my spare time (!) over the summer, I'm going to try to write an artificial-intelligence program for a certain game (TinyMUD by name; email me if you're curious enough). Now, the actual AI part of it will be easy. (Yeah, right.) My problem is accessing the telnet session. How do I go about connecting to a specific port on another computer through Lisp and have its I/O be used by a Lisp program, and, once I have that data, how can I do something useful with it? 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. Then, after I connect, I read strings of input, and send back strings o output in response. For example, I might receive: The quick brown fox jumped over the lazy dog. Ideally I'd like to be able to manipulate that sentence as a list of words -- or, more interestingly, as a list of lists of letters. How do I process the input? Similarly, how do I take the lists manipulated by my program and turn them into strings of words? Any and all help is appreciated. << Brian >> -- | Brian S. Kendig \ Macintosh | Engineering, | bskendig | | Computer Engineering |\ Thought | USS Enterprise | @phoenix.Princeton.EDU | Princeton University |_\ Police | -= NCC-1701-D =- | @PUCC.BITNET | ... s l o w l y, s l o w l y, w i t h t h e v e l o c i t y o f l o v e.