(close! server)
Stops the given Server.
Arguments:
server
: an Http.ServerReturns:
a Future that closes when the server stops
Stops the given Server. *Arguments*: * `server`: an Http.Server *Returns*: a Future that closes when the server stops
(configured server p)
Configures the given Http.Server
with the desired Stack.Param. Generally, prefer one of the
explicit configuration functions over this.
Arguments:
server
: an Http.Serverp
: a parameter that will be subsequently wrapped with Stack.Param
Returns:
the given Http.Server
Configures the given `Http.Server` with the desired Stack.Param. Generally, prefer one of the explicit configuration functions over this. *Arguments*: * `server`: an Http.Server * `p`: a parameter that will be subsequently wrapped with `Stack.Param` *Returns*: the given `Http.Server`
(http-server)
The base HTTP server. Call serve
on this once configured to begin listening to requests.
Arguments:
Returns:
an instance of Http.Server
The base HTTP server. Call `serve` on this once configured to begin listening to requests. *Arguments*: * None. *Returns*: an instance of `Http.Server`
(serve address service)
(serve server address service)
Creates a new HTTP server listening on the given address and responding with the given service or
service factory. The service must accept requests of type HttpRequest
, and respond with a Future
wrapping an HttpResponse
.
Arguments:
address
: a listening address, either a string of the form ":port"
or a SocketAddress
service
: a responding service, either a Service
or a ServiceFactory
server
(optional): a preconfigured Http.Server
Returns:
a running ListeningServer
Creates a new HTTP server listening on the given address and responding with the given service or service factory. The service must accept requests of type `HttpRequest`, and respond with a Future wrapping an `HttpResponse`. *Arguments*: * `address`: a listening address, either a string of the form `":port"` or a `SocketAddress` * `service`: a responding service, either a `Service` or a `ServiceFactory` * `server` (optional): a preconfigured `Http.Server` *Returns*: a running `ListeningServer`
(with-max-request-size server size)
Configures the given Http.Server
with a max request size.
Arguments:
server
: an Http.Serversize
: a StorageUnit
of the desired request sizeReturns:
the given Http.Server
Configures the given `Http.Server` with a max request size. *Arguments*: * `server`: an Http.Server * `size`: a `StorageUnit` of the desired request size *Returns*: the given `Http.Server`
(with-max-response-size server size)
Configures the given Http.Server
with a max response size.
Arguments:
server
: an Http.Serversize
: a StorageUnit
of the desired response sizeReturns:
the given Http.Server
Configures the given `Http.Server` with a max response size. *Arguments*: * `server`: an Http.Server * `size`: a `StorageUnit` of the desired response size *Returns*: the given `Http.Server`
(with-tls server cfg)
Configures the given Http.Server
with TLS.
Arguments:
server
: an Http.Servercfg
: a Netty3ListenerTLSConfig
configReturns:
the given Http.Server
Configures the given `Http.Server` with TLS. *Arguments*: * `server`: an Http.Server * `cfg`: a `Netty3ListenerTLSConfig` config *Returns*: the given `Http.Server`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close