(accept-connection {:keys [connections socket handler] :as server})
Accept a TCP socket connection.
Accept a TCP socket connection.
(client & {:keys [host port handler] :as options})
Create a new TCP client: :host - the host to connect to :port - the port to connect to :handler - the handler for incoming frames `(fn [frame] ...)
Create a new TCP client: :host - the host to connect to :port - the port to connect to :handler - the handler for incoming frames `(fn [frame] ...)
(close-connection {:keys [connections] :as server}
{:keys [socket] :as connection})
(receive {:keys [socket] :as endpoint} length)
Receives data from an endpoint's TCP socket
Receives data from an endpoint's TCP socket
(receive-frame {:keys [settings] :as endpoint})
Receive an h2 frame over an endpoint's TCP socket if available
Receive an h2 frame over an endpoint's TCP socket if available
(receive-preface endpoint)
Returns true if the h2-preface was correctly received over an endpoint's TCP socket
Returns true if the h2-preface was correctly received over an endpoint's TCP socket
(running? {:keys [socket]})
True if the client/server socket is open.
True if the client/server socket is open.
(server &
{:keys [host port backlog handler]
:or {host "127.0.0.1" backlog 100}
:as options})
Create a new TCP server: :host - the host to bind to (defaults to 127.0.0.1) :port - the port to bind to :backlog - the number of backlog connections :handler - the handler for received frames `(fn [connection frame] ...)
Create a new TCP server: :host - the host to bind to (defaults to 127.0.0.1) :port - the port to bind to :backlog - the number of backlog connections :handler - the handler for received frames `(fn [connection frame] ...)
(start-client {:keys [socket host port handler] :as client})
Start a TCP client connection to the target server
Start a TCP client connection to the target server
(start-server {:keys [socket host port backlog handler] :as server})
Start a TCP server and start accepting connections.
Start a TCP server and start accepting connections.
(stop-client {:keys [socket]})
Stop a TCP client connection to the target server
Stop a TCP client connection to the target server
(stop-server {:keys [socket connections] :as server})
Stop the TCP server and close all open connections.
Stop the TCP server and close all open connections.
(transmit {:keys [socket] :as endpoint} data)
Transmits data over an endpoint's TCP socket
Transmits data over an endpoint's TCP socket
(transmit-frame {:keys [settings] :as endpoint} frame)
Transmits an unpacked h2 frame over an endpoint's TCP socket
Transmits an unpacked h2 frame over an endpoint's TCP socket
(transmit-preface endpoint)
Transmits the h2 connection preface over an endpoint's TCP socket
Transmits the h2 connection preface over an endpoint's TCP socket
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close