Liking cljdoc? Tell your friends :D

aleph.netty


acquireclj

(acquire x)
source

activity-loggerclj

(activity-logger level)
(activity-logger name level)
source

AlephServercljprotocol

portclj

(port _)

Returns the port the server is listening on.

Returns the port the server is listening on.

wait-for-closeclj

(wait-for-close _)

Blocks until the server has been closed.

Blocks until the server has been closed.
source

allocateclj

(allocate x)
source

append-to-buf!clj

(append-to-buf! buf x)
source

array-classclj

source

attributeclj

(attribute s)
source

bandwidth-trackerclj

(bandwidth-tracker ch)
source

buf->arrayclj

(buf->array buf)
source

buffered-sourceclj

(buffered-source ch metric capacity)
source

bufs->arrayclj

(bufs->array bufs)
source

channelclj

(channel x)
source

channel-handlercljmacro

(channel-handler & {:as handlers})
source

channel-inbound-counterclj

source

channel-inbound-handlercljmacro

(channel-inbound-handler & {:as handlers})
source

channel-inbound-throughputclj

source

channel-outbound-counterclj

source

channel-outbound-handlercljmacro

(channel-outbound-handler & {:as handlers})
source

channel-outbound-throughputclj

source

channel-remote-addressclj

(channel-remote-address ch)
source

channel-server-nameclj

(channel-server-name ch)
source

channel-server-portclj

(channel-server-port ch)
source

channel-ssl-sessionclj

(channel-ssl-session ch)
source

client-event-thread-pool-nameclj

source

closeclj

(close x)
source

coerce-log-levelclj

(coerce-log-level level)
source

coerce-ssl-providerclj

(coerce-ssl-provider provider)
source

convert-address-typesclj

(convert-address-types address-types)
source

create-clientclj

(create-client pipeline-builder
               ssl-context
               bootstrap-transform
               remote-address
               local-address
               epoll?)
(create-client pipeline-builder
               ssl-context
               bootstrap-transform
               remote-address
               local-address
               epoll?
               name-resolver)
source

default-shutdown-quiet-periodclj

Default quiet period in seconds when shutting down an eventloop group

Default quiet period in seconds when shutting down an eventloop group
sourceraw docstring

default-shutdown-timeoutclj

Default timeout in seconds when shutting down an eventloop group

Default timeout in seconds when shutting down an eventloop group
sourceraw docstring

dns-default-portclj

source

dns-name-servers-providerclj

(dns-name-servers-provider servers)
source

dns-resolver-groupclj

(dns-resolver-group dns-options)

Creates an instance of DnsAddressResolverGroup that might be set as a resolver to Bootstrap. The supported options are the same as to dns-resolver-group-builder.

Creates an instance of DnsAddressResolverGroup that might be set as a resolver to
Bootstrap. The supported options are the same as to `dns-resolver-group-builder`.
sourceraw docstring

dns-resolver-group-builderclj

(dns-resolver-group-builder
  {:keys [max-payload-size max-queries-per-resolve address-types query-timeout
          min-ttl max-ttl negative-ttl trace-enabled? opt-resources-enabled?
          search-domains ndots decode-idn? recursion-desired? name-servers
          epoll?]
   :or {recursion-desired? true
        max-payload-size 4096
        opt-resources-enabled? true
        max-ttl Integer/MAX_VALUE
        max-queries-per-resolve 16
        ndots -1
        epoll? false
        min-ttl 0
        decode-idn? true
        query-timeout 5000
        trace-enabled? false}})

Creates an instance of DnsAddressResolverGroupBuilder that is used to configure and initialize an DnsAddressResolverGroup instance.

DNS options are a map of:

|:--- |:--- | max-payload-size | sets capacity of the datagram packet buffer (in bytes), defaults to 4096 | max-queries-per-resolve | sets the maximum allowed number of DNS queries to send when resolving a host name, defaults to 16 | address-types | sets the list of the protocol families of the address resolved, should be one of :ipv4-only, :ipv4-preferred, :ipv6-only, :ipv4-preferred (calculated automatically based on ipv4/ipv6 support when not set explicitly) | query-timeout | sets the timeout of each DNS query performed by this resolver (in milliseconds), defaults to 5000 | min-ttl | sets minimum TTL of the cached DNS resource records (in seconds), defaults to 0 | max-ttl | sets maximum TTL of the cached DNS resource records (in seconds), defaults to Integer/MAX_VALUE (the resolver will respect the TTL from the DNS) | negative-ttl | sets the TTL of the cache for the failed DNS queries (in seconds) | trace-enabled? | if set to true, the resolver generates the detailed trace information in an exception message, defaults to false | opt-resources-enabled? | if set to true, enables the automatic inclusion of a optional records that tries to give the remote DNS server a hint about how much data the resolver can read per response, defaults to true | search-domains | sets the list of search domains of the resolver, when not given the default list is used (platform dependent) | ndots | sets the number of dots which must appear in a name before an initial absolute query is made, defaults to -1 | decode-idn? | set if domain / host names should be decoded to unicode when received, defaults to true | recursion-desired? | if set to true, the resolver sends a DNS query with the RD (recursion desired) flag set, defaults to true | name-servers | optional list of DNS server addresses, automatically discovered when not set (platform dependent) | epoll? | if true, uses epoll, defaults to false

Creates an instance of DnsAddressResolverGroupBuilder that is used to configure and
initialize an DnsAddressResolverGroup instance.

   DNS options are a map of:

   |:--- |:---
   | `max-payload-size` | sets capacity of the datagram packet buffer (in bytes), defaults to `4096`
   | `max-queries-per-resolve` | sets the maximum allowed number of DNS queries to send when resolving a host name, defaults to `16`
   | `address-types` | sets the list of the protocol families of the address resolved, should be one of `:ipv4-only`, `:ipv4-preferred`, `:ipv6-only`, `:ipv4-preferred`  (calculated automatically based on ipv4/ipv6 support when not set explicitly)
   | `query-timeout` | sets the timeout of each DNS query performed by this resolver (in milliseconds), defaults to `5000`
   | `min-ttl` | sets minimum TTL of the cached DNS resource records (in seconds), defaults to `0`
   | `max-ttl` | sets maximum TTL of the cached DNS resource records (in seconds), defaults to `Integer/MAX_VALUE` (the resolver will respect the TTL from the DNS)
   | `negative-ttl` | sets the TTL of the cache for the failed DNS queries (in seconds)
   | `trace-enabled?` | if set to `true`, the resolver generates the detailed trace information in an exception message, defaults to `false`
   | `opt-resources-enabled?` | if set to `true`, enables the automatic inclusion of a optional records that tries to give the remote DNS server a hint about how much data the resolver can read per response, defaults to `true`
   | `search-domains` | sets the list of search domains of the resolver, when not given the default list is used (platform dependent)
   | `ndots` | sets the number of dots which must appear in a name before an initial absolute query is made, defaults to `-1`
   | `decode-idn?` | set if domain / host names should be decoded to unicode when received, defaults to `true`
   | `recursion-desired?` | if set to `true`, the resolver sends a DNS query with the RD (recursion desired) flag set, defaults to `true`
   | `name-servers` | optional list of DNS server addresses, automatically discovered when not set (platform dependent)
   | `epoll?` | if `true`, uses `epoll`, defaults to `false`
sourceraw docstring

ensure-dynamic-classloaderclj

(ensure-dynamic-classloader)

Ensure the context class loader has a valid loader chain to prevent ClassNotFoundException. https://github.com/clj-commons/aleph/issues/603.

Ensure the context class loader has a valid loader chain to
prevent `ClassNotFoundException`.
https://github.com/clj-commons/aleph/issues/603.
sourceraw docstring

ensure-epoll-available!clj

(ensure-epoll-available!)
source

enumerating-thread-factoryclj

(enumerating-thread-factory prefix daemon?)
source

epoll-available?clj

(epoll-available?)
source

epoll-client-groupclj

source

flushclj

(flush x)
source

get-attributeclj

(get-attribute ch attr)
source

get-default-event-loop-threadsclj

(get-default-event-loop-threads)

Determines the default number of threads to use for a Netty EventLoopGroup. This mimics the default used by Netty as of version 4.1.

Determines the default number of threads to use for a Netty EventLoopGroup.
This mimics the default used by Netty as of version 4.1.
sourceraw docstring

ignore-ssl-handshake-errorsclj

(ignore-ssl-handshake-errors _)

Intended for use as error callback on a maybe-ssl-handshake-future within a :channel-active handler. In this context, SSL handshake errors don't need to be handled since the SSL handler will terminate the whole pipeline by throwing javax.net.ssl.SSLHandshakeException anyway.

Intended for use as error callback on a `maybe-ssl-handshake-future`
within a `:channel-active` handler. In this context, SSL handshake
errors don't need to be handled since the SSL handler will terminate
the whole pipeline by throwing `javax.net.ssl.SSLHandshakeException`
anyway.
sourceraw docstring

insecure-ssl-client-contextclj

(insecure-ssl-client-context)
source

instrument!clj

(instrument! stream)
source

leak-detector-level!clj

(leak-detector-level! level)
source

maybe-ssl-handshake-futureclj

(maybe-ssl-handshake-future ch)

Returns a deferred which resolves to the channel after a potential SSL handshake has completed successfully. If no SslHandler is present on the associated pipeline, resolves immediately.

Returns a deferred which resolves to the channel after a potential
SSL handshake has completed successfully. If no `SslHandler` is
present on the associated pipeline, resolves immediately.
sourceraw docstring

nio-client-groupclj

source

pipeline-initializerclj

(pipeline-initializer pipeline-builder)
source

put!clj

(put! ch s msg)
source

releaseclj

(release x)
source

release-buf->arrayclj

(release-buf->array buf)
source

remove-if-presentclj

(remove-if-present pipeline handler)
source

safe-executecljmacro

(safe-execute ch & body)

Executes the body on the event-loop (an executor service) associated with the Netty channel.

Executes immediately if current thread is in the event loop. Otherwise, returns a deferred that will hold the result once done.

Executes the body on the event-loop (an executor service) associated with the Netty channel.

Executes immediately if current thread is in the event loop. Otherwise, returns a deferred
that will hold the result once done.
sourceraw docstring

self-signed-ssl-contextclj

(self-signed-ssl-context)

A self-signed SSL context for servers.

A self-signed SSL context for servers.
sourceraw docstring

set-attributeclj

(set-attribute ch attr val)
source

set-logger!clj

(set-logger! logger)
source

sinkclj

(sink ch)
(sink ch downstream? coerce-fn)
(sink ch downstream? coerce-fn additional-description)
source

sink-close-markerclj

source

sourceclj

(source ch)
source

ssl-client-contextclj

(ssl-client-context)
(ssl-client-context {:keys [private-key private-key-password certificate-chain
                            trust-store ssl-provider ciphers protocols
                            session-cache-size session-timeout]})

Creates a new client SSL context. Keyword arguments are: |:---|:---- | private-key | a java.io.File, java.io.InputStream, or java.security.PrivateKey containing the client-side private key. | certificate-chain | a java.io.File, java.io.InputStream, sequence of java.security.cert.X509Certificate, or array of java.security.cert.X509Certificate containing the client's certificate chain. | private-key-password | a string, the private key's password (optional). | trust-store | a java.io.File, java.io.InputStream, array of java.security.cert.X509Certificate, javax.net.ssl.TrustManager, or a javax.net.ssl.TrustManagerFactory to initialize the context's trust manager. | ssl-provider | SslContext implementation to use, on of :jdk, :openssl or :openssl-refcnt. Note, that when using OpenSSL based implementations, the library should be installed and linked properly. | ciphers | a sequence of strings, the cipher suites to enable, in the order of preference. | protocols | a sequence of strings, the TLS protocol versions to enable. | session-cache-size | the size of the cache used for storing SSL session objects. | session-timeout | the timeout for the cached SSL session objects, in seconds. Note that if specified, the types of private-key and certificate-chain must be "compatible": either both input streams, both files, or a private key and an array of certificates.

Creates a new client SSL context.
Keyword arguments are:
|:---|:----
| `private-key` | a `java.io.File`, `java.io.InputStream`, or `java.security.PrivateKey` containing the client-side private key.
| `certificate-chain` | a `java.io.File`, `java.io.InputStream`, sequence of `java.security.cert.X509Certificate`, or array of `java.security.cert.X509Certificate` containing the client's certificate chain.
| `private-key-password` | a string, the private key's password (optional).
| `trust-store` | a `java.io.File`, `java.io.InputStream`, array of `java.security.cert.X509Certificate`, `javax.net.ssl.TrustManager`, or a `javax.net.ssl.TrustManagerFactory` to initialize the context's trust manager.
| `ssl-provider` | `SslContext` implementation to use, on of `:jdk`, `:openssl` or `:openssl-refcnt`. Note, that when using OpenSSL based implementations, the library should be installed and linked properly.
| `ciphers` | a sequence of strings, the cipher suites to enable, in the order of preference.
| `protocols` | a sequence of strings, the TLS protocol versions to enable.
| `session-cache-size` | the size of the cache used for storing SSL session objects.
| `session-timeout` | the timeout for the cached SSL session objects, in seconds.
Note that if specified, the types of `private-key` and `certificate-chain` must be "compatible": either both input streams, both files, or a private key and an array of certificates.
sourceraw docstring

ssl-handshake-error?clj

(ssl-handshake-error? ex)
source

ssl-server-contextclj

(ssl-server-context)
(ssl-server-context {:keys [private-key private-key-password certificate-chain
                            trust-store ssl-provider ciphers protocols
                            session-cache-size session-timeout start-tls
                            client-auth]})

Creates a new server SSL context. Keyword arguments are: |:---|:---- | private-key | a java.io.File, java.io.InputStream, or java.security.PrivateKey containing the server-side private key. | certificate-chain | a java.io.File, java.io.InputStream, or array of java.security.cert.X509Certificate containing the server's certificate chain. | private-key-password | a string, the private key's password (optional). | trust-store | a java.io.File, java.io.InputStream, sequence of java.security.cert.X509Certificate, array of java.security.cert.X509Certificate, javax.net.ssl.TrustManager, or a javax.net.ssl.TrustManagerFactory to initialize the context's trust manager. | ssl-provider | SslContext implementation to use, on of :jdk, :openssl or :openssl-refcnt. Note, that when using OpenSSL based implementations, the library should be installed and linked properly. | ciphers | a sequence of strings, the cipher suites to enable, in the order of preference. | protocols | a sequence of strings, the TLS protocol versions to enable. | session-cache-size | the size of the cache used for storing SSL session objects. | session-timeout | the timeout for the cached SSL session objects, in seconds. | start-tls | if the first write request shouldn't be encrypted. | client-auth | the client authentication mode, one of :none, :optional or :require. Note that if specified, the types of private-key and certificate-chain must be "compatible": either both input streams, both files, or a private key and an array of certificates.

Creates a new server SSL context.
Keyword arguments are:
|:---|:----
| `private-key` | a `java.io.File`, `java.io.InputStream`, or `java.security.PrivateKey` containing the server-side private key.
| `certificate-chain` | a `java.io.File`, `java.io.InputStream`, or array of `java.security.cert.X509Certificate` containing the server's certificate chain.
| `private-key-password` | a string, the private key's password (optional).
| `trust-store` | a `java.io.File`, `java.io.InputStream`, sequence of `java.security.cert.X509Certificate`,  array of `java.security.cert.X509Certificate`, `javax.net.ssl.TrustManager`, or a `javax.net.ssl.TrustManagerFactory` to initialize the context's trust manager.
| `ssl-provider` | `SslContext` implementation to use, on of `:jdk`, `:openssl` or `:openssl-refcnt`. Note, that when using OpenSSL based implementations, the library should be installed and linked properly.
| `ciphers` | a sequence of strings, the cipher suites to enable, in the order of preference.
| `protocols` | a sequence of strings, the TLS protocol versions to enable.
| `session-cache-size` | the size of the cache used for storing SSL session objects.
| `session-timeout` | the timeout for the cached SSL session objects, in seconds.
| `start-tls` | if the first write request shouldn't be encrypted.
| `client-auth` | the client authentication mode, one of `:none`, `:optional` or `:require`.
Note that if specified, the types of `private-key` and `certificate-chain` must be "compatible": either both input streams, both files, or a private key and an array of certificates.
sourceraw docstring

start-serverclj

(start-server {:keys [pipeline-builder ssl-context bootstrap-transform on-close
                      socket-address transport shutdown-quiet-period
                      shutdown-timeout]})
(start-server pipeline-builder
              ssl-context
              bootstrap-transform
              on-close
              socket-address
              epoll?)
source

to-byte-bufclj

(to-byte-buf x)
(to-byte-buf ch x)
source

to-byte-buf-streamclj

(to-byte-buf-stream x chunk-size)
source

wrap-futureclj

(wrap-future f)
source

writeclj

(write x msg)
source

write-and-flushclj

(write-and-flush x msg)
source

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

× close