Liking cljdoc? Tell your friends :D

net.async.tcp


acceptclj

(accept env at & {:as opts})

env :: result of (event-loop) at :: map of {:host <String> :port <int>}, :host defaults to wildcard address Possible opts are:

  • :accept-chan :: <chan> to populate with accepted client sockets, defaults to (chan) Following options will be translated to client sockets created by accept:
  • :read-chan-fn :: no-args fn returning <chan>, will be used to create :read-chan for accepted sockets
  • :write-chan-fn :: no-args fn returning <chan>, will be used to create :write-chan for accepted sockets
  • :heartbeat-period :: Heartbeat interval, ms. Default value is 5000
  • :heartbeat-timeout :: When to consider connection stale. Default value is (* 4 heartbeat-period)
env                  :: result of (event-loop)
at                    :: map of {:host <String> :port <int>}, :host defaults to wildcard address
Possible opts are:
 - :accept-chan       :: <chan> to populate with accepted client sockets, defaults to (chan)
Following options will be translated to client sockets created by accept:
 - :read-chan-fn      :: no-args fn returning <chan>, will be used to create :read-chan for accepted sockets
 - :write-chan-fn     :: no-args fn returning <chan>, will be used to create :write-chan for accepted sockets
 - :heartbeat-period  :: Heartbeat interval, ms. Default value is 5000
 - :heartbeat-timeout :: When to consider connection stale. Default value is (* 4 heartbeat-period)
sourceraw docstring

add-watchesclj

(add-watches {:keys [sockets selector running?]})
source

bufclj

(buf size)
source

buf-arrayclj

(buf-array & xs)
source

client-socketclj

(client-socket socket-ref)
source

close-net-chanclj

(close-net-chan socket-ref)
(close-net-chan selector socket-ref)
source

connectclj

(connect env to & {:as opts})

env :: result of (event-loop) to :: map of {:host <String> :port <int>} Possible opts are:

  • :read-chan :: <chan> to populate with reads from socket, defaults to (chan)
  • :write-chan :: <chan> to schedule writes to socket, defaults to (chan)
  • :heartbeat-period :: Heartbeat interval, ms. Defaults to 5000
  • :heartbeat-timeout :: When to consider connection stale. Default value is (* 4 heartbeat-period)
env                  :: result of (event-loop)
to                    :: map of {:host <String> :port <int>}
Possible opts are:
 - :read-chan         :: <chan> to populate with reads from socket, defaults to (chan)
 - :write-chan        :: <chan> to schedule writes to socket, defaults to (chan)
 - :heartbeat-period  :: Heartbeat interval, ms. Defaults to 5000
 - :heartbeat-timeout :: When to consider connection stale. Default value is (* 4 heartbeat-period)
sourceraw docstring

detect-connectingclj

(detect-connecting sockets)
source

detect-deadclj

(detect-dead sockets)
source

detect-stuckclj

(detect-stuck sockets)
source

event-loopclj

(event-loop)
source

event-loop-implclj

(event-loop-impl {:keys [sockets started? running? selector] :as env})
source

exhausted?clj

(exhausted? bufs)
source

in-threadclj

(in-thread name f & args)
source

inet-addrclj

(inet-addr {:keys [host port]})
source

new-socketclj

(new-socket opts)
source

nowclj

(now)
source

on-acceptedclj

(on-accepted socket-ref net-chan)
source

on-conn-closedclj

(on-conn-closed socket-ref)
source

on-conn-droppedclj

(on-conn-dropped socket-ref)
source

on-connectedclj

(on-connected socket-ref)
source

on-read-readyclj

(on-read-ready socket-ref)
source

on-write-doneclj

(on-write-done socket-ref)
source

select-optsclj

(select-opts socket)
source

shutdown!clj

(shutdown! event-loop)
source

write-bufsclj

(write-bufs payload)
source

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

× close