Liking cljdoc? Tell your friends :D

qbits.jet.server

Adapter for the Jetty 9 server, with websocket + core.async support. Derived from ring.adapter.jetty

Adapter for the Jetty 9 server, with websocket + core.async support.
Derived from ring.adapter.jetty
raw docstring

any->parser-complianceclj

(any->parser-compliance pc)
source

run-jettyclj

(run-jetty {:as options
            :keys [websocket-handler ring-handler host port max-threads
                   min-threads input-buffer-size max-idle-time ssl-port
                   configurator parser-compliance daemon? ssl? join? http2?
                   http2c?]
            :or {max-threads 50
                 max-idle-time 200000
                 input-buffer-size 8192
                 parser-compliance HttpCompliance/LEGACY
                 port 80
                 min-threads 8
                 join? true
                 daemon? false
                 ssl? false}})

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

  • :port - the port to listen on (defaults to 80)

  • :host - the hostname to listen on

  • :join? - blocks the thread until server ends (defaults to true)

  • :http2? - enable HTTP2 transport

  • :http2c? - enable HTTP2C transport (cleartext)

  • :configurator - fn that will be passed the server instance before server.start()

  • :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?)

  • :keystore - the keystore to use for SSL connections

  • :keystore-type - the format of keystore

  • :key-password - the password to the keystore

  • :truststore - a truststore to use for SSL connections

  • :truststore-type - the format of trust store

  • :trust-password - the password to the truststore

  • :max-threads - the maximum number of threads to use (default 50)

  • :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)

  • :client-auth - SSL client certificate authenticate, may be set to :need, :want or :none (defaults to :none)

  • :output-buffer-size - (default 32768)

  • :input-buffer-size - (default 8192)

  • :request-header-size - (default 8192)

  • :response-header-size - (default 8192)

  • :send-server-version? - (default true)

  • :send-date-header? - (default false)

  • :header-cache-size - (default 512)

  • :websocket-handler - a handler function that will receive a RING request map with the following keys added:

    • :in: core.async chan that receives data sent by the client
    • :out: core async chan you can use to send data to client
    • :ctrl: core.async chan that received control messages such as: [::error e], [::close code reason]
Start a Jetty webserver to serve the given handler according to the
supplied options:


* `:port` - the port to listen on (defaults to 80)
* `:host` - the hostname to listen on
* `:join?` - blocks the thread until server ends (defaults to true)
* `:http2?` - enable HTTP2 transport
* `:http2c?` - enable HTTP2C transport (cleartext)
* `:configurator` - fn that will be passed the server instance before server.start()
* `: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?)
* `:keystore` - the keystore to use for SSL connections
* `:keystore-type` - the format of keystore
* `:key-password` - the password to the keystore
* `:truststore` - a truststore to use for SSL connections
* `:truststore-type` - the format of trust store
* `:trust-password` - the password to the truststore
* `:max-threads` - the maximum number of threads to use (default 50)
* `: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)
* `:client-auth` - SSL client certificate authenticate, may be set to :need, :want or :none (defaults to :none)
* `:output-buffer-size` - (default 32768)
* `:input-buffer-size` - (default 8192)
* `:request-header-size` - (default 8192)
* `:response-header-size` - (default 8192)
* `:send-server-version?` - (default true)
* `:send-date-header?` - (default false)
* `:header-cache-size` - (default 512)
* `:websocket-handler` - a handler function that will receive a RING request map with the following keys added:

    * `:in`: core.async chan that receives data sent by the client
    * `:out`: core async chan you can use to send data to client
    * `:ctrl`: core.async chan that received control messages such as: `[::error e]`, `[::close code reason]`
sourceraw docstring

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

× close