[Gd-hackers] koala changes
Chris Page
chris at chris-page.org
Mon Jan 22 05:54:41 CET 2007
On Jan 18, 2007, at 08:15 AM, Carl Gay wrote:
> let config = make(<http-server-configuration>);
> load-config(config, "filename");
> config.port := 8001; // optional
> config.xml-rpc-enabled? := #t;
> register-url(config, '/foo', my-responder);
> register-xml-rpc-method(config, "blah", blah);
> let server = make(<http-server>, config: config);
> start-server(server); // returns immediately. optionally waits.
I'm unclear what you're trying to say with this example, and what the
relationships between the pieces of data are.
Are you overriding the port and XML RPC values after loading them as
part of the configuration file, or are they always supplied
separately? What goes in a configuration?
Why aren't more of the values supplied as initialization arguments to
make?
Why not do it more like this:
let config = make(<http-server-configuration>,
init-file: "filename",
port: 8001,
xml-rpc-enabled: #t,
url-responders: vector(make(<url-responder>,
url: "/foo",
responder: my-
responder)),
xml-rpc-methods: vector(make(<xml-rpc-method>,
blah-string: "blah",
blah: blah)));
let server = make(<http-server>, configuration: config);
start-server(server);
Alternatively, how about using a serialization library to read/write
the server object?
--
Chris Page - Software Wrangler
That’s “Chris” with a silent *and* invisible “3”.
More information about the hackers
mailing list