racket/collects/web-server/scribblings/web-config-unit.scrbl
Eli Barzilay d26f27e140 Lots of minor edits -- mainly dropping unnecessary backslashes and
using @litchar with braces.

svn: r11451
2008-08-27 08:35:27 +00:00

70 lines
2.3 KiB
Racket

#lang scribble/doc
@(require "web-server.ss")
@title[#:tag "web-config-unit.ss"]{Web Config Unit}
@(require (for-label web-server/web-config-unit)
(for-label web-server/web-config-sig))
The @web-server offers a unit-based approach to configuring the server.
@section{Configuration Signature}
@defmodule[web-server/web-config-sig]
@defsignature[web-config^ ()]{
@signature-desc{
Provides contains the following identifiers.
}
@defthing[max-waiting integer?]{
Passed to @scheme[tcp-accept].
}
@defthing[virtual-hosts (listof (cons/c string? host-table?))]{
Contains the configuration of individual virtual hosts.
}
@defthing[scripts (box/c (cache-table? path? servlet?))]{
Contains initially loaded servlets.
}
@defthing[initial-connection-timeout integer?]{
Specifies the initial timeout given to a connection.
}
@defthing[port port-number?]{
Specifies the port to serve HTTP on.
}
@defthing[listen-ip string?]{
Passed to @scheme[tcp-accept].
}
@defthing[make-servlet-namespace make-servlet-namespace?]{
Passed to @scheme[servlets:make].
}
}
@section{Configuration Units}
@defmodule[web-server/web-config-unit]
@defproc[(configuration-table->web-config@ [path path?]
[#:port port (or/c false/c port-number?) #f]
[#:listen-ip listen-ip (or/c false/c string?) #f]
[#:make-servlet-namespace make-servlet-namespace make-servlet-namespace? (make-make-servlet-namespace)])
(unit? web-config^)]{
Reads the S-expression at @scheme[path] and calls
@scheme[configuration-table-sexpr->web-config@] appropriately.
}
@defproc[(configuration-table-sexpr->web-config@ [sexpr list?]
[#:web-server-root web-server-root path? (directory-part default-configuration-table-path)]
[#:port port (or/c false/c port-number?) #f]
[#:listen-ip listen-ip (or/c false/c string?) #f]
[#:make-servlet-namespace make-servlet-namespace make-servlet-namespace? (make-make-servlet-namespace)])
(unit? web-config^)]{
Parses @scheme[sexpr] as a configuration-table and constructs a @scheme[web-config^] unit.
}