(run-http-server handler
{:keys [host port min-threads max-threads max-queued-requests
thread-idle-timeout ssl-context executor]
:or {host localhost
port 8080
min-threads 8
max-threads 50
max-queued-requests 1024
thread-idle-timeout 60000
ssl-context nil
executor 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 127.0.0.1) :max-threads - the maximum number of threads to use (default 50) :min-threads - the minimum number of threads to use (default 8) :max-queued-requests - the maximum number of requests to be queued (default 1024) :thread-idle-timeout - Set the maximum thread idle time. Threads that are idle for longer than this period may be stopped (default 60000) :ssl-context - the ssl context, that is used in https server :executor - executor to use in HttpServer, will default to ThreadPoolExecutor
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)
:max-threads - the maximum number of threads to use (default 50)
:min-threads - the minimum number of threads to use (default 8)
:max-queued-requests - the maximum number of requests to be queued (default 1024)
:thread-idle-timeout - Set the maximum thread idle time. Threads that are idle
for longer than this period may be stopped (default 60000)
:ssl-context - the ssl context, that is used in https server
:executor - executor to use in HttpServer, will default to ThreadPoolExecutor(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 |