(restart-http-server server handler server-config)(restart-http-server server handler server-config delay)restarts HttpServer with an optional delay (in seconds) to allow active request to finish.
restarts HttpServer with an optional delay (in seconds) to allow active request to finish.
(run-http-server handler
{:keys [host port ssl-context executor get-ssl-client-cert?
backlog record-support? async? request-map-fields]
:or {record-support? true
executor (Executors/newVirtualThreadPerTaskExecutor)
backlog (* 1024 8)
get-ssl-client-cert? false
async? false
request-map-fields nil
port 8080
host "0.0.0.0"
ssl-context nil}})Start a com.sun.net.httpserver.HttpServer to serve the given handler according to the supplied options:
:port - the port to listen on (defaults to 8080) :host - the hostname to listen on (defaults to 0.0.0.0) :ssl-context - the ssl context, that is used in https server :executor - executor to use in HttpServer, will default to ThreadPerTaskExecutor :get-ssl-client-cert? - a boolean value indicating whether retrieve client certs, will default to false. :backlog - size of a backlog, defaults to 8192 :record-support? - option to disable record support, defaults to true :async? - Async-over-sync support, defaults to false :request-map-fields - set of keys to include in request map (e.g. #{:body :headers :uri}), defaults to nil (all fields)
Start a com.sun.net.httpserver.HttpServer to serve the given
handler according to the supplied options:
:port - the port to listen on (defaults to 8080)
:host - the hostname to listen on (defaults to 0.0.0.0)
:ssl-context - the ssl context, that is used in https server
:executor - executor to use in HttpServer, will default to ThreadPerTaskExecutor
:get-ssl-client-cert? - a boolean value indicating whether retrieve client certs, will default to false.
:backlog - size of a backlog, defaults to 8192
:record-support? - option to disable record support, defaults to true
:async? - Async-over-sync support, defaults to false
:request-map-fields - set of keys to include in request map (e.g. #{:body :headers :uri}), defaults to nil (all fields)
(stop-http-server server)(stop-http-server server delay)Stops a com.sun.net.httpserver.HttpServer with an optional delay (in seconds) to allow active request to finish.
Stops a com.sun.net.httpserver.HttpServer with an optional delay (in seconds) to allow active request to finish.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |