[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: am I stupid? I crashed my Mac 10 times with 9 lines of code.
In article <firstname.lastname@example.org>,
email@example.com (Karsten Poeck) wrote:
|In article <PHILG.94Aug18131743@camelot.ai.mit.edu>, firstname.lastname@example.org wrote:
|> Remember I said I wanted a function to go out to the network and grab
|4the following gets the same as my unix box
|(defun get-http-url (hostname filename)
| (let ((stream (open-tcp-stream hostname 80))
| (ccl::telnet-write-line stream (format nil "GET ~a HTTP/1.0" filename))
| (ccl::telnet-write-line stream "")
| (setq result (ccl::telnet-read-line stream)))
| (close stream))
|(get-http-url "www-swiss.ai.mit.edu" "/")
FWIW, this gave me error -23005:
> Error: TCP connection closing
> While executing: CCL::%TCP-CONTROL
> Type Command-. to abort.
See the Restarts
menu item for further choices.
on the given home page, as well as a local one.
The backtrace looks something like:
method stream-tyi tcp-stream
The local variables for telnet-read-line seem to indicate that all the
data has been received, ie, the value of ccl::line is what the function
should be returning...
-- "TANSTAAFL" Rich email@example.com