(run-http-server handler
{:keys [host port ssl-context executor get-ssl-client-cert?
backlog]
:or {host default-host
port 8080
ssl-context nil
executor (Executors/newCachedThreadPool)
get-ssl-client-cert? false
backlog (* 1024 8)}})
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 127.0.0.1) :ssl-context - the ssl context, that is used in https server :executor - executor to use in HttpServer, will default to ThreadPoolExecutor :get-ssl-client-cert? - a boolean value indicating whether to enable mutual TLS (mTLS), will default to false. :backlog - size of a backlog, defaults to 8192
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 127.0.0.1) :ssl-context - the ssl context, that is used in https server :executor - executor to use in HttpServer, will default to ThreadPoolExecutor :get-ssl-client-cert? - a boolean value indicating whether to enable mutual TLS (mTLS), will default to false. :backlog - size of a backlog, defaults to 8192
(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 is a website building & hosting documentation for Clojure/Script libraries
× close