Re: ANN: trivial-sockets 0.1 asdf-installable
From: Peter Seibel (peter_at_javamonkey.com)
Date: 10/27/04
- Next message: Mark A. Gibbs: "Re: C++ sucks for games"
- Previous message: Gareth McCaughan: "Re: Employment puzzles and Lisp"
- Next in thread: dan_at_telent.net: "Re: ANN: trivial-sockets 0.1 asdf-installable"
- Reply: dan_at_telent.net: "Re: ANN: trivial-sockets 0.1 asdf-installable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 27 Oct 2004 01:53:58 GMT
Daniel Barlow <dan@telent.net> writes:
> TRIVIAL-SOCKETS is a socket interface for "undemanding network
> applications". In its current incarnation, it exports one function
> OPEN-STREAM which opens a client socket to some Internet-family stream
> (e.g. TCP-based) server, such as HTTP, SMTP, Finger, Telnet or
> whatever. It accepts hostnames or IP addresses and signals a
> documented kind of error if something goes wrong.
>
> (with-open-stream (s (trivial-sockets:open-stream "www.google.com" 80))
> (format s "HEAD / HTTP/1.0~%Host: www.google.com~%~%")
> (force-output s)
> (loop
> (let ((l (read-line s nil nil)))
> (unless l (return))
> (princ l) (terpri))))
>
> More information by following pointers from
>
> http://www.cliki.net/trivial-sockets
>
> In version 0.1, TRIVIAL-SOCKETS can be installed automatically with
> asdf-install and supports (in alphabetical order) Allegro CL, CLISP,
> CMUCL, OpenMCL, and SBCL
>
> http://www.cliki.net/asdf-install
Since you seem to be going great guns on this, any thought of
providing equally trivial support for the server-side sockets? E.g.:
(with-open-stream (ss (trivial-sockets::open-server-socket 80))
(loop
(with-open-stream (s (trivial-sockets::accept ss))
(do-http s))))
-Peter
--
Peter Seibel peter@javamonkey.com
Lisp is the red pill. -- John Fraser, comp.lang.lisp
- Next message: Mark A. Gibbs: "Re: C++ sucks for games"
- Previous message: Gareth McCaughan: "Re: Employment puzzles and Lisp"
- Next in thread: dan_at_telent.net: "Re: ANN: trivial-sockets 0.1 asdf-installable"
- Reply: dan_at_telent.net: "Re: ANN: trivial-sockets 0.1 asdf-installable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|