[hunchentoot-devel] Customizing acceptor behaviour

Sebastian Tennant sebyte at smolny.plus.com
Thu Oct 15 10:13:35 UTC 2009


Hi Edi,

Thanks for your reply.

Quoth Edi Weitz <edi at agharta.de>:
> From taking a quick glance at what you wrote here my suspicion is that
> you have the wrong concept of Lisp packages.  I'd suggest that you
> take a look at this
>
>   http://weitz.de/packages.html
>
> and then for example read the chapter about packages in Peter Seibel's book.

I've read this chapter and I've also read Erann Gat's 'Complete Idiot's Guide
to Common Lisp Packages'.  Gat goes into considerably greater depth than Seibel
and I think it's fair to say that I do understand packages; namespaces
respected by the Lisp reader, nothing more.

Everything I'm trying to do is in attempt to make it quick and easy to create
development and production environments served by hunchentoot in a single Lisp
image.

I was trying to subclass ACCEPTOR so that I can create them like so:

 (defvar *dispatch-table#1* '())
 (make-instance 'my-subclassed-acceptor :port 1234
                                        :msg-log-file "~/htoot-message-file#1.log"
                                        :dispatch-table *dispatch-table#1*)

 Making an instance of my-subclassed-acceptor should also define a function
 'msg' which writes to the log file specified.

I was then attempting to put the code that implements this subclass in its own
package so that it can easily be use'd in other packages.

You have designed hunchentoot with the ability to create multiple acceptors,
each listening on a different port.  I am simply trying to extend that
spearation so that each acceptor can be configured to use its own dispatch
table and write to its own message log file.

Seb
-- 
Emacs' AlsaPlayer - Music Without Jolts
Lightweight, full-featured and mindful of your idyllic happiness.
http://home.gna.org/eap





More information about the Tbnl-devel mailing list