Subject: [clisp-list] Networking?

From: Douglas Philips <[email-masked]>
Date: Mon Feb 9 05:52:09 2004

Hey all,
    Just a ping to find out if there are folks out there "doing much" 
with the sockets library in CLISP or if FFI is the preferred method. I 
found some messages in the archive from about 3 years ago re: UDP and 
using FFI... If there have been more recent messages, a pointer/tip to 
a subject line or date range would be appreciated. Thanks,
		<D\'gou

---

From: Sam Steingold <[email-masked]>
Date: Mon Feb 9 07:09:06 2004

> * Douglas Philips <[email-masked]> [2004-02-09 08:51:29 -0500]:
>
> Just a ping to find out if there are folks out there "doing much" with
> the sockets library in CLISP

CLOCC/CLLIB/gq.lisp gets stock quotes over the web.
CLOCC/CLLIB/rpm.lisp gets RPM updates (poor man's apt-get/up2date)

> or if FFI is the preferred method. 
I have never used FFI for networking.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Save your burned out bulbs for me, I'm building my own dark room.

---

From: "John K. Hinsdale" <[email-masked]>
Date: Mon Feb 9 07:30:14 2004

> the sockets library in CLISP

I haven't used the sockets directly even though my code does some
networked stuff (Oracle access, LDAP access and CGI access).  Though
each of these layers does sockets traffic, the socket access is done
not in lisp but directly by the corresponding library that interfaces
to Lisp.

Now, I *AM* thinking of writing a simple SMTP client for my programs
to send Email notifications to me for certain events.  For that I
would use the socket interface directly from Lisp to speak the SMTP
protocol.

 > [Sam Steingold]

Indeed, nor would I expect would you have to; in fact if one found
oneself using the FFI so that he could make TCP/IP related calls from
"C" for functionality he needed from Lisp, that is probably an
indication that the socket lib is lacking and thus occasion to
incorporate instead those functions in the socket lib instead.

Hope that made sense.

PS: There seems to be a simple SMTP client at Franz's site but it
appears Franz/allegro specific (just as my CLISP-sockets SMTP lib
would probably be clisp specific).

---

From: Michael Koehne <[email-masked]>
Date: Mon Feb 9 07:49:07 2004

Moin Douglas Philips,

> a subject line or date range would be appreciated. Thanks,

  normal networking improved a bit last year, when I needed (socket-status
  to work right in combination with (read-byte-sequence - so normal TCP
  client server applications are possible.

    (setq s (socket-server 5555))
    (setq x (socket-accept s))
    (format x "Hello!~%")
    (setq y (read-line x))
    (format x "y = ~A~%" y)
    (format x "BYE~%")
    (close x)
    (socket-server-close s)

  This could be exteneded towards you application. But you may either
  want to fork() after (socket-accept to continue using a simple (read-line
  on the socket, or you need to use (read-byte-sequence as stdio does'nt
  work with select().

  An FFI implementing simple (read-line and hiding the nastynesses of
  IAC telnet signals would be nice. I therefore swiched to GCL where
  (defentry is much easier than FFI.

Bye Michael
-- 
  mailto:[email-masked]             UNA:+.? 'CED+2+:::Linux:2.4.22'UNZ+1'
  http://www.xml-edifact.org/           CETERUM CENSEO WINDOWS ESSE DELENDAM

---

From: Paolo Amoroso <[email-masked]>
Date: Mon Feb 9 09:33:08 2004

> Now, I *AM* thinking of writing a simple SMTP client for my programs
[...]
> appears Franz/allegro specific (just as my CLISP-sockets SMTP lib

You may check the code that comes with CLOCC:

  src/cllib/url.lisp

Paolo
-- 
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film