Increasing code xrefs

svn: r12481
This commit is contained in:
Jay McCarthy 2008-11-18 00:02:28 +00:00
parent d1fca9c04a
commit bba0d3b3d4
8 changed files with 42 additions and 20 deletions

View File

@ -3,6 +3,12 @@
@title[#:tag "lang/web.ss"]{Stateless Web Interaction}
@(require (for-label net/url
xml
scheme/serialize
web-server/servlet/servlet-structs
web-server/http))
@section{Low Level}
@(require (for-label web-server/lang/abort-resume))

View File

@ -34,7 +34,7 @@ You are given the entire @schememodname[web-server/servlet] API.
@subsection{Customization API}
@defmodule[web-server/insta/insta] {
@defmodule[web-server/insta/insta]{
The following API is provided to customize the server instance:
@ -81,11 +81,15 @@ To run the web server with MrEd, use
@; ------------------------------------------------------------
@section[#:tag "web-server.ss"]{Functional}
@(require (for-label web-server/web-server))
@(require (for-label web-server/dispatchers/filesystem-map)
(for-label web-server/web-config-unit)
(for-label web-server/web-config-sig)
(for-label web-server/configuration/configuration-table)
@(require (for-label web-server/web-server
web-server/dispatchers/filesystem-map
web-server/web-config-unit
web-server/web-config-sig
web-server/private/dispatch-server-unit
web-server/private/dispatch-server-sig
web-server/dispatchers/dispatch
web-server/configuration/configuration-table)
(prefix-in raw: (for-label net/tcp-unit))
(prefix-in files: (for-label web-server/dispatchers/dispatch-files)))
@defmodule[web-server/web-server]{
@ -94,14 +98,14 @@ To run the web server with MrEd, use
of the @web-server in other applications, or loading a custom
dispatcher.
@defproc[(serve [#:dispatch dispatch dispatcher?]
@defproc[(serve [#:dispatch dispatch dispatcher/c]
[#:tcp@ tcp@ tcp-unit^ raw:tcp@]
[#:port port integer? 80]
[#:listen-ip listen-ip (or/c string? false/c) #f]
[#:max-waiting max-waiting integer? 40]
[#:initial-connection-timeout initial-connection-timeout integer? 60])
(-> void)]{
Constructs an appropriate @scheme[dispatch-config^], invokes the
Constructs an appropriate @scheme[dispatch-server-config^], invokes the
@scheme[dispatch-server@], and calls its @scheme[serve] function.
The @scheme[#:tcp@] keyword is provided for building an SSL server. See @secref["faq:https"].
@ -122,7 +126,7 @@ from a given path:
#:port 8080))
]
@defproc[(serve/ports [#:dispatch dispatch dispatcher?]
@defproc[(serve/ports [#:dispatch dispatch dispatcher/c]
[#:tcp@ tcp@ tcp-unit^ raw:tcp@]
[#:ports ports (listof integer?) (list 80)]
[#:listen-ip listen-ip (or/c string? false/c) #f]
@ -133,7 +137,7 @@ from a given path:
a function that shuts down all of the server instances.
}
@defproc[(serve/ips+ports [#:dispatch dispatch dispatcher?]
@defproc[(serve/ips+ports [#:dispatch dispatch dispatcher/c]
[#:tcp@ tcp@ tcp-unit^ raw:tcp@]
[#:ips+ports ips+ports (listof (cons/c (or/c string? false/c) (listof integer?))) (list (cons #f (list 80)))]
[#:max-waiting max-waiting integer? 40]

View File

@ -3,7 +3,10 @@
@title[#:tag "servlet-env.ss"
#:style 'toc]{Simple Single Servlet Servers}
@(require (for-label web-server/servlet-env))
@(require (for-label web-server/servlet-env
web-server/http
web-server/managers/lru
scheme/list))
@defmodule[web-server/servlet-env]{
@ -77,7 +80,7 @@ the top-level interacts with continuations. (Read: Don't do it.)
[#:servlet-regexp servlet-regexp regexp?
(regexp (format "^~a$" (regexp-quote servlet-path)))]
[#:stateless? stateless? boolean? #f]
[#:manager manager manager? default-threshold-LRU-manager]
[#:manager manager manager? (make-threshold-LRU-manager #f (* 1024 1024 64))]
[#:servlet-namespace servlet-namespace (listof module-path?) empty]
[#:server-root-path server-root-path path? default-server-root-path]
[#:extra-files-paths extra-files-paths (listof path?) (list (build-path server-root-path "htdocs"))]

View File

@ -3,7 +3,8 @@
@title[#:tag "stateless-servlets"]{Stateless Servlets}
@(require (for-label "dummy-stateless-servlet.ss")) @; to give a binding context
@(require (for-label web-server/http
"dummy-stateless-servlet.ss")) @; to give a binding context
@declare-exporting[#:use-sources (web-server/scribblings/dummy-stateless-servlet)]
@defthing[interface-version (one-of/c 'stateless)]{
@ -29,6 +30,8 @@ The @schememodname[web-server] language automatically provides the @schememodnam
@; ------------------------------------------------------------
@section[#:tag "considerations"]{Usage Considerations}
@(require (for-label web-server/lang/web))
@defmodulelang[web-server]
A servlet has the following process performed on it automatically:

View File

@ -2,7 +2,8 @@
@(require "web-server.ss")
@title{Version 1 Servlets}
@(require (for-label "dummy-v1-servlet.ss")) @; to give a binding context
@(require (for-label web-server/http
"dummy-v1-servlet.ss")) @; to give a binding context
@declare-exporting[#:use-sources (web-server/scribblings/dummy-v1-servlet)]
@defthing[interface-version (one-of/c 'v1)]{

View File

@ -2,7 +2,9 @@
@(require "web-server.ss")
@title{Version 2 Servlets}
@(require (for-label "dummy-v2-servlet.ss")) @; to give a binding context
@(require (for-label web-server/http
(except-in web-server/managers/manager manager)
"dummy-v2-servlet.ss")) @; to give a binding context
@declare-exporting[#:use-sources (web-server/scribblings/dummy-v2-servlet)]
@defthing[interface-version (one-of/c 'v2)]{

View File

@ -2,7 +2,9 @@
@(require "web-server.ss")
@title[#:tag "web.ss"]{Web Interaction}
@(require (for-label web-server/servlet/web))
@(require (for-label web-server/servlet/web
web-server/servlet/servlet-structs
web-server/http))
@defmodule[web-server/servlet/web]{The
@schememodname[web-server/servlet/web] library provides the primary
@ -23,7 +25,7 @@ functions of interest for the servlet developer.
]
}
@defproc[(send/suspend [make-response response-generator?]
@defproc[(send/suspend [make-response response-generator/c]
[exp expiration-handler/c (current-servlet-continuation-expiration-handler)])
request?]{
Captures the current continuation, stores it with @scheme[exp] as the expiration
@ -81,7 +83,7 @@ functions of interest for the servlet developer.
your application and you may think of it as ``embedding'' value-less callbacks.
}
@defproc[(send/forward [make-response response-generator?]
@defproc[(send/forward [make-response response-generator/c]
[exp expiration-handler/c (current-servlet-continuation-expiration-handler)])
request?]{
Calls @scheme[clear-continuation-table!], then @scheme[send/suspend].

View File

@ -55,7 +55,7 @@ Equivalent to @scheme[string?].
Example: @scheme["http://localhost:8080/servlets;1*1*20131636/examples/add.ss"]}
@defthing[response-generator? contract?]{
@defthing[response-generator/c contract?]{
Equivalent to @scheme[(k-url? . -> . response?)].
Example: @schemeblock[(lambda (k-url)
@ -91,7 +91,8 @@ This is what @scheme[send/suspend/dispatch] gives to its function argument.
@; ------------------------------------------------------------
@section[#:tag "lang/file-box.ss"]{File Boxes}
@(require (for-label web-server/lang/file-box))
@(require (for-label web-server/lang/file-box
scheme/serialize))
@defmodule[web-server/lang/file-box]{