This is the mail archive of the
guile@cygnus.com
mailing list for the Guile project.
Re: Guile for servlets (a sort of generic mod_guile)
> It's not one line, but it's pretty short:
>
> http://www.gnu.org/software/guile/docs/faq/guile-faq.html#Daemon
>
> I hope this helps.
Right, but it's not packaged. The user has to copy that into their
program and tweak the bits that matter. If someone fixes a bug, the
user has to recopy and retweak.
One idea (possibly a dumb one) would be to make a special script
interpreter for writing servers.
#!/usr/local/bin/guile-server
!#
(handle-connection 20004
(lambda (socket)
(write (apply + (read socket)) socket)
(close-port socket)))
or whatever. Maybe it would be just as effective as a module:
#!/usr/local/bin/guile -s
!#
(use-modules (net quick-server))
(handle-connection 20004
(lambda (socket)
(write (apply + (read socket)) socket)
(close-port socket)))
(server-wait)