1 Running the Web Server
2 Scheme Servlets
3 Web Language Servlets
4 Configuration
5 Dispatchers
6 Web Config Unit
7 Web Server Unit
8 Continuation Managers
9 Internal
10 Troubleshooting
11 Acknowledgements
Index
On this page:
send/ back
current-servlet-continuation-expiration-handler
send/ suspend
continuation-url?
adjust-timeout!
clear-continuation-table!
send/ forward
send/ finish
send/ suspend/ dispatch
redirect/ get
redirect/ get/ forget
embed-ids
current-url-transform
Version: 4.0.2

 

2.6 Web

 (require web-server/servlet/web)

The web-server/servlet/web library provides the primary functions of interest for the servlet developer.

(send/back response)  void?

  response : response?

Sends response to the client.

current-servlet-continuation-expiration-handler : parameter?

Holds the expiration-handler? to be used when a continuation captured in this context is expired, then looked up.

(send/suspend make-response [exp])  request?

  make-response : response-generator?

  

exp

 

:

 

expiration-handler?

 

 

 

=

 

(current-servlet-continuation-expiration-handler)

Captures the current continuation, stores it with exp as the expiration handler, and binds it to a URL. make-response is called with this URL and is expected to generate a response?, which is sent to the client. If the continuation URL is invoked, the captured continuation is invoked and the request is returned from this call to send/suspend.

(continuation-url? u)

  (or/c false/c (list/c number? number? number?))

  u : url?

Checks if u is a URL that refers to a continuation, if so returns the instance id, continuation id, and nonce.

(adjust-timeout! t)  void?

  t : number?

Calls the servlet’s manager’s adjust-timeout! function.

(clear-continuation-table!)  void?

Calls the servlet’s manager’s clear-continuation-table! function.

(send/forward make-response [exp])  request?

  make-response : response-generator?

  

exp

 

:

 

expiration-handler?

 

 

 

=

 

(current-servlet-continuation-expiration-handler)

Calls clear-continuation-table!, then send/suspend.

(send/finish response)  void?

  response : response?

Calls clear-continuation-table!, then send/back.

(send/suspend/dispatch make-response)  any/c

  make-response : (embed/url? . -> . response?)

Calls make-response with a function that, when called with a procedure from request? to any/c will generate a URL, that when invoked will call the function with the request? object and return the result to the caller of send/suspend/dispatch.

(redirect/get)  request?

Calls send/suspend with redirect-to.

(redirect/get/forget)  request?

Calls send/forward with redirect-to.

(embed-ids ids u)  string?

  ids : (list/c number? number? number?)

  u : url?

Creates a continuation-url?.

current-url-transform : parameter?

Holds a url-transform? function that is called by send/suspend to transform the URLs it generates.