Liking cljdoc? Tell your friends :D

ring.adapter.jetty9

Adapter for the Jetty 10 server, with websocket support. Derived from ring.adapter.jetty

Adapter for the Jetty 10 server, with websocket support.
Derived from ring.adapter.jetty
raw docstring

close!clj

source

connected?clj

source

idle-timeout!clj

source

normalize-responseclj

(normalize-response response)

Normalize response for ring spec

Normalize response for ring spec
sourceraw docstring

ping!clj

source

proxy-async-handlerclj

(proxy-async-handler handler options)

Returns an Jetty Handler implementation for the given Ring async handler.

Returns an Jetty Handler implementation for the given Ring **async** handler.
sourceraw docstring

proxy-handlerclj

(proxy-handler handler options)

Returns an Jetty Handler implementation for the given Ring handler.

Returns an Jetty Handler implementation for the given Ring handler.
sourceraw docstring

remote-addrclj

source

req-ofclj

source

run-jettyclj

(run-jetty
  handler
  {:as options
   :keys [configurator join? async? allow-null-path-info wrap-jetty-handler]
   :or {allow-null-path-info false join? true wrap-jetty-handler identity}})

Start a Jetty webserver to serve the given handler according to the supplied options:

:http? - allow connections over HTTP :port - the port to listen on (defaults to 80) :host - the hostname to listen on :async? - using Ring 1.6 async handler? :join? - blocks the thread until server ends (defaults to true) :daemon? - use daemon threads (defaults to false) :ssl? - allow connections over HTTPS :ssl-port - the SSL port to listen on (defaults to 443, implies :ssl?) :ssl-context - an optional SSLContext to use for SSL connections :keystore - the keystore to use for SSL connections :keystore-type - the format of keystore :key-password - the password to the keystore :key-manager-password - the password for key manager :truststore - a truststore to use for SSL connections :truststore-type - the format of trust store :trust-password - the password to the truststore :ssl-protocols - the ssl protocols to use, default to ["TLSv1.3" "TLSv1.2"] :ssl-provider - the ssl provider, default to "Conscrypt" :exclude-ciphers - when :ssl? is true, additionally exclude these cipher suites :exclude-protocols - when :ssl? is true, additionally exclude these protocols :replace-exclude-ciphers? - when true, :exclude-ciphers will replace rather than add to the cipher exclusion list (defaults to false) :replace-exclude-protocols? - when true, :exclude-protocols will replace rather than add to the protocols exclusion list (defaults to false) :thread-pool - the thread pool for Jetty workload, accepts an instance of org.eclipse.jetty.util.thread.ThreadPool :max-threads - the maximum number of threads to use (default 50), ignored if :thread-pool provided :min-threads - the minimum number of threads to use (default 8), ignored if :thread-pool provided :threadpool-idle-timeout - the maximum idle time in milliseconds for a thread (default 60000), ignored if :thread-pool provided :job-queue - the job queue to be used by the Jetty threadpool (default is unbounded), ignored if :thread-pool provided :max-idle-time - the maximum idle time in milliseconds for a connection (default 200000) :ws-max-idle-time - the maximum idle time in milliseconds for a websocket connection (default 500000) :ws-max-text-message-size - the maximum text message size in bytes for a websocket connection (default 65536) :client-auth - SSL client certificate authenticate, may be set to :need, :want or :none (defaults to :none) :h2? - enable http2 protocol on secure socket port :h2c? - enable http2 clear text on plain socket port :proxy? - enable the proxy protocol on plain socket port (see http://www.eclipse.org/jetty/documentation/9.4.x/configuring-connectors.html#_proxy_protocol) :wrap-jetty-handler - a wrapper fn that wraps default jetty handler into another, default to identity, not that it's not a ring middleware :sni-required? - require sni for secure connection, default to false :sni-host-check? - enable host check for secure connection, default to true :http3? - enable http3 protocol, make sure you have info.sunng/ring-jetty9-adapter-http3 package on classpath

Start a Jetty webserver to serve the given handler according to the
supplied options:

:http? - allow connections over HTTP
:port - the port to listen on (defaults to 80)
:host - the hostname to listen on
:async? - using Ring 1.6 async handler?
:join? - blocks the thread until server ends (defaults to true)
:daemon? - use daemon threads (defaults to false)
:ssl? - allow connections over HTTPS
:ssl-port - the SSL port to listen on (defaults to 443, implies :ssl?)
:ssl-context - an optional SSLContext to use for SSL connections
:keystore - the keystore to use for SSL connections
:keystore-type - the format of keystore
:key-password - the password to the keystore
:key-manager-password - the password for key manager
:truststore - a truststore to use for SSL connections
:truststore-type - the format of trust store
:trust-password - the password to the truststore
:ssl-protocols - the ssl protocols to use, default to ["TLSv1.3" "TLSv1.2"]
:ssl-provider - the ssl provider, default to "Conscrypt"
:exclude-ciphers      - when :ssl? is true, additionally exclude these
                        cipher suites
:exclude-protocols    - when :ssl? is true, additionally exclude these
                        protocols
:replace-exclude-ciphers?   - when true, :exclude-ciphers will replace rather
                              than add to the cipher exclusion list (defaults
                              to false)
:replace-exclude-protocols? - when true, :exclude-protocols will replace
                              rather than add to the protocols exclusion list
                              (defaults to false)
:thread-pool - the thread pool for Jetty workload, accepts an instance of `org.eclipse.jetty.util.thread.ThreadPool`
:max-threads - the maximum number of threads to use (default 50), ignored if `:thread-pool` provided
:min-threads - the minimum number of threads to use (default 8), ignored if `:thread-pool` provided
:threadpool-idle-timeout - the maximum idle time in milliseconds for a thread (default 60000), ignored if `:thread-pool` provided
:job-queue - the job queue to be used by the Jetty threadpool (default is unbounded), ignored if `:thread-pool` provided
:max-idle-time  - the maximum idle time in milliseconds for a connection (default 200000)
:ws-max-idle-time  - the maximum idle time in milliseconds for a websocket connection (default 500000)
:ws-max-text-message-size  - the maximum text message size in bytes for a websocket connection (default 65536)
:client-auth - SSL client certificate authenticate, may be set to :need, :want or :none (defaults to :none)
:h2? - enable http2 protocol on secure socket port
:h2c? - enable http2 clear text on plain socket port
:proxy? - enable the proxy protocol on plain socket port (see http://www.eclipse.org/jetty/documentation/9.4.x/configuring-connectors.html#_proxy_protocol)
:wrap-jetty-handler - a wrapper fn that wraps default jetty handler into another, default to `identity`, not that it's not a ring middleware
:sni-required? - require sni for secure connection, default to false
:sni-host-check? - enable host check for secure connection, default to true
:http3? - enable http3 protocol, make sure you have `info.sunng/ring-jetty9-adapter-http3` package on classpath
sourceraw docstring

send!clj

source

stop-serverclj

(stop-server s)
source

wrap-proxy-handlerclj

(wrap-proxy-handler jetty-handler)

Wraps a Jetty handler in a ServletContextHandler.

Websocket upgrades require a servlet context which makes it necessary to wrap the handler in a servlet context handler.

Wraps a Jetty handler in a ServletContextHandler.

Websocket upgrades require a servlet context which makes it
necessary to wrap the handler in a servlet context handler.
sourceraw docstring

ws-upgrade-request?clj

source

ws-upgrade-responseclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close