Liking cljdoc? Tell your friends :D

h2.protocol.tcp


accept-connectionclj

(accept-connection {:keys [connections socket handler] :as server})

Accept a TCP socket connection.

Accept a TCP socket connection.
sourceraw docstring

clientclj

(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] ...)
sourceraw docstring

close-connectionclj

(close-connection {:keys [connections] :as server}
                  {:keys [socket] :as connection})
source

receiveclj

(receive {:keys [socket] :as endpoint} length)

Receives data from an endpoint's TCP socket

Receives data from an endpoint's TCP socket
sourceraw docstring

receive-frameclj

(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
sourceraw docstring

receive-prefaceclj

(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
sourceraw docstring

running?clj

(running? {:keys [socket]})

True if the client/server socket is open.

True if the client/server socket is open.
sourceraw docstring

serverclj

(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] ...)
sourceraw docstring

start-clientclj

(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
sourceraw docstring

start-serverclj

(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.
sourceraw docstring

stop-clientclj

(stop-client {:keys [socket]})

Stop a TCP client connection to the target server

Stop a TCP client connection to the target server
sourceraw docstring

stop-serverclj

(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.
sourceraw docstring

transmitclj

(transmit {:keys [socket] :as endpoint} data)

Transmits data over an endpoint's TCP socket

Transmits data over an endpoint's TCP socket
sourceraw docstring

transmit-frameclj

(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
sourceraw docstring

transmit-prefaceclj

(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
sourceraw docstring

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

× close