Subject: [clisp-list] Re: clisp-list digest, Vol 1 #413 - 4 msgs

From: Karsten <[email-masked]>
Date: Mon Mar 11 16:01:10 2002

At 12:01 3/10/2002 -0800, [email-masked] wrote:
>It compiles on msvc and my HTTP-getter works with it.
Hello Arseny

could you share the http-getter with us so that I can test the IPV6 mod on 
Cygwin?

It compiles fine (the second patch from Sam) but I also don't know of an 
easy way to test the socket code.

Karsten

---

From: Arseny Slobodjuck <[email-masked]>
Date: Tue Mar 12 13:47:02 2002

Hello Karsten,

Tuesday, March 12, 2002, 9:59:53 AM, you wrote:

Karsten> could you share the http-getter with us so that I can test the IPV6 mod on
Karsten> Cygwin?

That's it. I don't khow how "testful" is it in this case. IP address
and HTTP address have to be splitted before use. I mean if you usually
go http://www.zzz.com/index.html, you should use
"www.zzz.com" as server and "/index.html" as address. "http://"
goes to trash can.

=======
(defun bk(n)
 (loop for i from 1 to n do (princ #\Backspace)))

(defun http-get(server address &optional datasink)
 (let ((got 0)(getstream (socket-connect 80 server)))
  (if getstream
   (progn
    (format t "Connected to ~A. Lokin around" server)
    (format getstream "GET ~A~%" address)
    (loop with line = nil
          do (setf line (read-line getstream nil nil))
          while line
          do (format (if datasink datasink t) "~A~%" line)
             (incf got (+ (length line) 1))
             (when datasink
               (bk 12)
               (format t "~6,'0D bytes" got)))
    (format t "~%Got ~A : ~D bytes from ~A~%" address got getstream)
    (close getstream))
  (format t  "Cannot connect to ~A~%" server))))

(http-get "192.168.1.1" "/vp/index.html")
=======

-- 
Best regards,
 Arseny                            mailto:[email-masked]

---

From: Sam Steingold <[email-masked]>
Date: Tue Mar 12 20:29:03 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Re: clisp-list digest, Vol 1 #413 - 4 msgs"
> * Sent on Tue, 12 Mar 2002 00:59:53 +0100
> * Honorable Karsten <[email-masked]> writes:
>
> could you share the http-getter with us so that I can test the IPV6
> mod on Cygwin?

see CLOCC/PORT/net.lisp and CLOCC/CLLIB/url.lisp
<http://www.podval.org/~sds/data/port.html>
<http://www.podval.org/~sds/data/cllib.html>

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.2 GNU/Linux
Keep Jerusalem united! <http://www.onejerusalem.org/Petition.asp>
Read, think and remember! <http://www.iris.org.il> <http://www.memri.org/>
Sinners can repent, but stupid is forever.